Android Geolocation Issue

Hi everyone,
I have a question that’s been bothering me for a while, and I’m hoping someone here might have some advice.

Like many of you, I use automations with geolocation — specifically, I have one that triggers when coming home or leaving home to set a certain occupancy mode. My “home” zone is set with a 200m radius.

Here’s the issue: I recently switched from iOS to Android. On iOS, geolocation always worked flawlessly — entering or leaving the zone triggered the automation almost immediately, and I had a parallel notification to confirm that.

But on Android, I’m having trouble figuring out the best settings for location sensors. While the automation does usually trigger, it doesn’t seem to happen exactly when entering or leaving the zone. Compared to iOS, there’s a noticeable delay — often several tens of meters.

That alone wouldn’t be a big problem, but the more serious issue is that sometimes, even when I’m already home and connected to the local network, the geolocation briefly jumps to a location several hundred meters away — just for 5 to 10 seconds — and then corrects itself. This causes the automation to switch to “away” mode. It’s really frustrating when the lights turn off, security mode is activated, covers are closed, and so on — all while I’m actually still home.

On iOS, I was using Apple’s Home app for geolocation automation, which worked really well. I combined it with a Home Assistant input_boolean to control home/away status. Unfortunately, there’s no equivalent on Android, so as a workaround, I now have an automation that only triggers if the home > away state persists for at least 5 minutes.

I hope I explained everything clearly. Has anyone else experienced this issue with Android geolocation? Do you have any tips for configuring the Android Companion App to make geolocation more reliable?

Thanks in advance!

check the location tracking history page and look at the reports that you had in the incorrect location…check the accuracy of teh report and you may need to adjust the sensor setting to be less than that value…however if you see a lot of valid reports with the same accuracy level then that may complicate things

https://companion.home-assistant.io/docs/core/location#location-sensor-settings

Hi @dshokouhi, Well, I don’t really know where and what data to look at. In the history I can see when an error occurred, that the position changed for a few seconds. To check, I created a card with a map for the 48h history. And I’m surprised that the sensor updates attributes so often, even within the home, a few meters. Is this correct behavior?

from the app

settings > companion app > troubleshooting > location tracking history

yes those attributes should update anytime the device tracker gets an update, the section above what i linked describes how often the tracker should update

Thanks for the guidance, I’ll keep an eye on it for a while and try different settings. And hopefully the situation will get better. :+1:

My experience over the last few Android releases is geolocation has been getting worse due to increasingly aggressive OS actions to put apps into deep sleep - which prevents them from updating HA.

There’s a few threads on the forum about issues with background data updates - delayed messages, geolocation not updating, etc. I’ve tried not sending true location, just zone areas but even then, triggering wasn’t reliable or battery life (latest Android on a recent Pixel) was noticeably impacted.

I guess better battery life is good, but unless an app is in the foreground, or there’s a new API for background processing, IMHO the trend on Android is sadly towards delayed updates.

Thanks for the advice, the recommended settings from the documentation helped. The problem with random jumps in location is no longer there. :tada:

1 Like