Location sensors - Making use of "High accuracy mode when entering zone"

I just recently started to make use of the Android Companion Apps location sensor / device_tracker. With the default settings

  • Background Location: Enabled (High accuracy mode: Disabled - Minimum Accuracy: 200)
  • Location Zone: Enabled (Minimum Accuracy: 200)
  • Single Accurate Location: Enabled (Include in sensor update: Disabled - Minimum Accuracy: 200 - Minimum time between updates: 60000)

I made the expierience, that there can be almost 15 minutes inbetween location updates, which is not nearly accurate enough to detect, if I am closing in on my home zone (for which I use the proximity integration). Therefore I am playing aroung with the high accuracy mode. Knowing it uses more battery, I would like to limit the use to the minimum. Since a couple of months (April to be specific) the app supports the feature, to enable high accuracy mode, when approaching a zone. For this an extended zone is formed around the targeted zone.

This sounds perfect, but would only work, if the “less accurate” location mode is updated in time to detect, that I am now in the zone.home_expanded. With the expierienced update rate of up to 15 minutes, that zone would need to be rather huge.

What are your expieriences? Is there anyway to improve the “less accurate” location mode to make use of this expanded home zone? Otherwise I would need to enable high accuracy mode based on bluetooth connection, which means that the mode is enabled throughout the full commute.

I have about 40 minutes to work.
I have sometimes not had the charge cable in during the drive and I barely notice a difference.
I have the screen on all the time, Waze running and high accuracy mode with every five seconds.

I can test it tomorrow morning and see exactly how much the battery drops during the drive but it’s nothing that has concerned me yet

During the 40 minutes drive with screen on, Waze running and high accuracy mode on the battery dropped from 75 to 69%

Thanks for your feedback it’s really appreciated. I am just trying to optimize the behavior. For now I am also using the Bluetooth connection as you have shown me in another thread. But I am also trying to figure out what the experience of others is with the new option. The basic idea of it seems great.

I also found that the high accuracy when nearing home zone didn’t switch quickly enough for a fast update when I reached home. I’ve worked around this by adding a device_tracker.brent_override to my person, and when my phone connects to my home wifi, I have an automation that calls device_tracker.see to set that to home. Then when I leave and GPS causes my person to leave home, another automation sets that back to not_home. It’s a bit klugey, and not how I would ideally be handling it, but it does provide a fast update when I get home.

1 Like

The 15 minute thing is only if the app has the same location as previously sent. Otherwise you get updates every couple of minutes. Try to inspect the zone events to see if you need to adjust your accuracy setting. That might help trigger things faster.

What do I need to be looking for? When I noticed this, I was on my commute from work (zone.work) to home (zone.home). Parts of it on the Autobahn, so I question that the location was the same for some time.
Upon entering or leaving the zone the location is usually updated quite responsively, also when not using high accuracy mode.

if you don’t see updates for 15 minutes when your driving on a freeway then check the logs under App Configuration. You will see the entire decision making process for location there included when we receive an update and the reason for not sending the data. We also log when we send data too. So you’ll need to pull up and see what it says.

An example of what to expect can be seen here: https://companion.home-assistant.io/docs/troubleshooting/faqs#location-is-not-updating-in-android-app

Zone events are different than background location which is why you have 2 separate accuracy settings. You can also listen for the events for zone entry to see if accuracy is high or low. Its possible we get an event and ignore it due to accuracy not being met.

Very interesting and a good hint. Thank you for the information. I will monitor the behavior and check the logs.

Yea I found that we had to make discovering proper settings some how easy to do and logs were perfect since we have a whole decision making process and makes it easy for users to follow and developers to troubleshoot. Personally for me I noticed even when I am at home my average accuracy was around 350 so I decided to set mine to 400.

As Hellis81 is proposing, I am now using high accuracy mode, when connected to my cars Bluetooth.
Today I did another test and deactivated that option, to check in the App’s log, why location updates come in so sparsely, when not using the high accuracy mode.
On my drive to practice (~15 Minutes) I did not receive a single location update. There was nothing disregarded in the logs. I could just not find any single line regarding a location update…

So for now I will use the high accuracy mode, when connected to Bluetooth, but I’d be interested in why that “low” accuracy mode is performing so poorly on my phone when traveling.

If you did not see a log statement saying location update received them the app never got an update from Google.

Reviving this thread to add an observation : I had very sparse location updates and HA would take sometimes a lot of time detecting someone leaving the house. I noticed that the moment I launched google maps, HA updated its location and the automations ran.
So I looked at Google maps notification/access rights and deactivated the option “remove rights when the app is not used”. Lo and behold, now the GPS updates are more frequent and automations work as intended.
Edit : Not sure about this solution anymore… But using a persistent connection with HA seems to work flawlessly (in HA companion app settings).
Hope that helps someone.