I use the wireless hotspot function daily as part of business, providing a wifi network from my Nexus 7 tablet (Lollipop, oem) to other business-essential devices.
When I get back home (alternatively, within range of my home Wifi network), I'd like to have the hotspot automatically turn off, and the tablet to use the wifi network.
Currently, if I forget to turn off the hotspot, I can inadvertently empty or overuse my mobile data, which is obviously quite costly.
So, is there a way to have the hotspot turn off automatically (but not using a timeout) based on location and/or wifi availability?
I would prefer non-root, non-flash-another-ROM solutions but am open to these as well if they're more elegant.
//edit: An additional problem is that work and home are ~300m apart in a rural environment, so geolocation is flakey and the cell tower doesn't change. Wifi presence is the only good discriminant I see...