I think I'll submit a bug report, but I want to share experiences / collect more data first. I also want to share a workaround.
I've been using Home Assistant Companion app for years. I noticed that some months ago the following issue started: the notification "Updating sensors" would end up being stuck, sometimes for many hours.
I verified that this was not a purely cosmetic/UI/notification issue because the sensors in Home Assistant server were indeed not being updated. I didn't see any errors or anything out of the ordinary in the app logs. The background worker doing sensor updates would just get stuck and never recover.
None of the usual worked: force stopping, wiping data, etc.
After being frustrated for a long time, I found out that this happened with this following combination:
- Pixel 9 Pro (unlikely to be relevant)
- Sandboxed Play Services: installed (with location permission enabled)
- Reroute location requests to the OS: enabled
- Network location: GrapheneOS proxy
- Geocoder: GrapheneOS proxy
So, for some reason, when the app used Google Location API and that request got re-routed to GOS, there is something different happening in this new code path which ends up in location requests being stuck. When I change Reroute location requests to the OS to disabled, then all requests ended up landing at Play Services and a I never saw a stuck sensor again.
So, if you're seeing the same with the Companion app, you should try disabling the Reroute setting.
I'll do some more experimentation to get to the bottom of this.
The source for Home Assistant app location requesting is: https://github.com/home-assistant/android/blob/main/app/src/full/kotlin/io/homeassistant/companion/android/sensors/LocationSensorManager.kt
I'm going to set Reroute location back to enabled and then tweaking the following two settings:
- Network location: GrapheneOS proxy / Apple server / Off
- Geocoder: GrapheneOS proxy / Nominatim server / Off
It might be that those requests sometimes get stuck in one of the two above. I'll start with both Off and see if the problems manifest again.
Any reports from other users regarding the above are greatly appreciated.