Automation to toggle phone sensors?

Is there a way to make an automation that would enable or disable a phone sensor? If not in the app then via Tasker maybe?

Not possible, what’s the use case?

I don’t always want to share my location. Currently I have to go through and turn off 4 sensors every time I want to be off the map. It’d be a lot easier to just toggle an automation to turn those sensors off. I was hoping that the app could be exposed to Tasker to handle it but I guess not.

why dont you just use the wifi connection sensor becuse you can determine location without GPS? This is a very strange request. I suppose you can submit a feature request on github to do it directly from the app instead of using Tasker. I dont think any other device tracker does this. Alternatively you can also just use Tasker to turn off location on the device or see if it can revoke location permissions and regrant later? I dont think I ever heard of a request like this honestly.

I dont think any other device tracker does this.

Owntracks does have something like this. It has a persistent notification with links that let you toggle between modes - manual (no automatic updates), significant changes (which I think uses background updates), move (continuous). You can also automate the mode using Android intents.

I think GPSLogger also has a persistent notification that has stop/start links for toggling tracking.

I used it to quickly toggle location tracking on and off. I had two uses cases for switching it off:

  • If I knew I was going to be out all day and moving around a lot, to reduce battery use.
  • If I was going out of the home zone but only for a short time, to avoid having automations run when I didn’t need them to.

I’ve switched to the Home Assistant app for all of the other features, but this would be a useful one to have. I’ve tried wifi tracking for the simple case of home/not home but my phone doesn’t always reconnect to my wifi before I’ve opened the door, so I’d get false alarms.

Thank you for your response and not making me feel like a crazy person for wanting to do this. In the Home Assistant ethos of being able to “automate everything” I’d love to see the app opened up to Tasker to manage my phone sensors that are on my phone.

There is already an existing feature request on github for this

You should open a feature request on github for this, the app should be able to handle this on its own without needing Tasker. A notification command will be able to do it.

Is there any update about this? I use room-assistant and I would like to stop the ble beacon when I am not home to save battery life, but I can’t find a way to do it

you should spend some time reading the docs, you can already turn off the BLE transmitter using notification commands

That´s amazing, thank you for the guidance