I’ve been having issues with the Home Assistant Android app location services since the 5th June Pixel service/security update. When I am out and about if I do not wake my phone I do not get device_tracker updates, also geocoded location doesn’t work - it doesn’t change. If I wake my phone it will generally send the correct information back to HA.
If I am out for more than 1 hour then it might send a location but less than that (e.g. a 40 min dog walk) it doesn’t register me as away. I have various local zones setup for different heating and light automations which don’t know the zone so don’t trigger. My update interval is 15/1 (15 normally/1 charging).
I have also noticed that Home Assistant did request my location in the background whilst I was out by checking the Location Timeline.
Other sensors do seem to work e.g. I added battery temperature and this was happily pinging away whilst I was out.
I did wonder if this was the app as 2023.6 came at a similar time to the Pixel update but on 2023.3 (which was working perfectly) I experienced the same issue. So I assume this is an Android update issue.
My wife has a Samsung phone on the latest software and HA app which is working well.
My HA app has battery optimisation off, background location is on (all the time). I did also change Location services to set battery mode to unrestricted.
Has anyone else experienced this on their Pixels? Any suggestions of permissions I should be looking into? It seems that the device isn’t updating it’s background location properly and is reporting at it’s last known location until it gets woken up by the screen turning on.
I know this doesn’t help much, but wanted to let you know that my Pixel 7 Pro with the June 5 security update still works correctly with background locations in HA.
If you haven’t already done it, power off (not just restart) your Pixel and reboot. You never know - sometimes 3 minutes can save hours of troubleshooting.
I did go through these, unfortunately using the app did mean location updates were sent and the logs never went back far enough if I checked them as soon as I returned home. I assume the logging only started when the app started up again but wasn’t allowed to be running in the background properly.
Background usage is/was allowed but it seems that the Adaptive Battery settings could also now impede this. It might actually be an Android bug where the Adaptive Battery settings are not obeying the Background usage allowed settings.
So far turning off the Adaptive Battery setting seems to have worked. I’ll walk the dog soon so that will be a good test as that didn’t work before. I’ll mark as the solution if it does work in the hope it will help anyone else.
Not that I’ve come across, this Adaptive Battery setting seems to override the per app settings power settings (the Unrestricted, Optimised, Restricted ones).
So I have a Pixel 7 Pro with adaptive battery enabled and following the troubleshooting steps linked earlier location updates work as expected. Always remember when it comes to location troubleshooting the logs are the best place to start when you notice an issue. The steps do continue to talk about the logs to troubleshoot other issues like in case a location report is discarded for accuracy, in those cases you want to increase the accuracy setting. In my own use case I have accuracy set to 600 instead of the default 200.
Ho I had identical issue with the pixel 7a of my girlfriend. It didn’t update the location so all the automations related to the heating system in the house didn’t work properly. Following the suggestion to
turn off the adaptive battery for phone settings
re-enabling the geocoded location sensor from companion app in the the HA app in the pixel 7a
re-enabling accuracy interval and accuracy mode sensors from companion app in the the HA app in the pixel 7a
I immediately received the update of location of pixel 7a.
Tomorrow I will check if it’s still working.
Finger crossed and really thanks for the suggestion.