Location not working, stumped

Location on the HA map has been working for me for years. But recently, it stopped working and I cannot figure it out.

App is on galaxy s24+ and s25+. Both do not update to the ha server. App has unrestricted battery. Background location is on. I have zones set up that turn on higher update frequency as we enter them. When out, I look at the app, settings, sensors, and the geocoded location is exactly where I am, far from home. But look at HA server map, it says I am at home. The location it puts me at is right about where the wifi is lost. But, the companion app has full connectivity to the ha server through many casa and mobile data. I can turn on lights, see the map, and the map says I am at home.

Any recommendations on what I should look at?

It looks like 5he app has stopped reporting any data to the HA server unless it is on wifi. I set the companion app to send the music volume to ha server. Changing it while on wifi works, sending it to ha server. But changing it while away, it does not update ha server. But the app has connection to the HA server, and I can view music volume history while away from the wifi.

Check your person entity in the States tool when you are outside your home zone. In the attributes column check that the value of the source attribute is your phone’s device tracker entity.

Yes that is set correctly. And if I move about within the range of my wifi, that is reflected on the map and is correct for the tracker in the states entity. But as soon as the phone loses connection to the wifi, then HA is not updates for any of the enabled phone sensors until I return to wifi. It looks like the app has been set to not perform sensor updates when the phone is not on the network. This happened to the two different phones at the same time. Unsure if 5his is both phones companion app, or something wrong with my nabu casa subscription, or my server.

Note that the companion app has no issue connecting to my ha server to control everything in the house, just it is not updating on the phone sensor states.

Yeah, something is set such that the Companion app does not send any sensor data from the phone via nabu casa when it is using mobile data. At home, I turn off wifi on the phone, and change the music volume up and down, the HA server never gets updated. I turn Wifi back on, and the music volume is immediately updated on the HA server. This is the same for all sensors on both phones.

Is there a setting that will make the Companion App never update sensors unless connected to the local wifi?

Thanks
David

In Android settings, Apps, what does it say for ‘Mobile data’ for the relevant apps?

n Mobile Data for Companion App:
It has used 12MB since I reinstalled the app, 30 minutets ago.,
Allow background data usage = True.
Allow data usage while data saver is on = True.

It definitely can use the mobile data, because without the wifi connected, I can use the companion app, connected to my HA server through Nabu Casa, and turn lights on or off, etc.

Ok. One less thing to worry about.

Is there anything in Nabu Casa itself that can stop the sensor values being sent? I just uninstalled and reinstalled the app, same behaviour. Also, given this happened only recently, with the two phones on that HA server, i am thinking it is less likely the companion app. Or maybe a but in the companion app updates?

Yeah, looks like Nabu Casa is partially orphaned from my server. My server says it is Connected to Nabu Casa. But when i log on to Nabu Casa, that says “Your instance is not connected to Home Assistant Cloud”. " Remote address: Not available**"

I then logged my instance out of Nabu Casa and logged back in, and now Nabu Casa says it is connected.

And, changing the music volume on the phone while not connected to the wifi now updates in HA. I have never seen this before. Is this a common occurrence, one that I should monitor for?

This happened to me once. I haven’t seen it since, which was a couple of months ago. Same fix, logout and login solved it.

If you’re having trouble with background location updates or consistent connectivity in the Home Assistant Companion app—especially when everything looks fine in the app permissions and battery settings—make sure to check your SSL/TLS certificate setup.

Recently, I discovered that the app would intermittently fail to send location updates or sync sensors unless the app was foregrounded or on local Wi-Fi. The root cause turned out to be an incomplete SSL certificate chain provided by my server (for example, a missing intermediate certificate in the NGINX or proxy config). While browsers may let you bypass or “trust” the certificate, the Home Assistant Android Companion app refuses to connect in background if the certificate isn’t fully trusted by Android—including all intermediate certs. This type of error can be very subtle in logs and almost invisible in the user interface.

Solution:

  • Ensure your server is configured to use the “fullchain” certificate (not just cert.pem!), so that the chain includes all necessary intermediates.
  • If you’re using a proxy (NGINX, etc.), double-check that it points to the correct files and signals no SSL errors in its own logs.
  • You can test your server’s SSL validity and chain with tools like openssl s_client -connect your.domain.com:443 and verify that no “unable to verify the first certificate” appears in the output.
  • Once fixed, location updates and background connectivity should work again—even over mobile data.

Hope this saves someone hours of troubleshooting!