I have tried from different devices and it always appears as “unknown”. I have been searching the Internet for possible solutions and I see that you have to have a certain configuration for it to work correctly. I have seen in the official documentation everything necessary to make it work, but I have seen that most of the solutions that people find is that you have to activate the “Location Sensor” inside the APP.
I thought I had that figured out, but checking from my APP, I don’t see that option even though the app has GPS permissions.
Some screenshots about the configuration. Does anyone know if I’m missing something?
Last I checked the device tracker never had “location” in the name. I could be wrong. Either way, he should be looking in the mobile app integration at his device in the diagnostic section.
There isn’t for iOS, you configure the location in another menu. I don’t have my Android in front of me. However, looking at my Android device (which I never changed from the defaults) I can say that the resulting location device is a device_tracker and does not contain the word: location.
The application is the one in F-Droid and my phone is a Redmi Note 8 Pro with a custom rom. Anyway, I have tested the same app on a levono tablet and the same thing happens to me.
Chances are that Google Services do not fully work as expected and that the companion app cannot get a proper location. You can check:
if there is a device tracker in HA related to the phone
if the device tracker shows GPS coordinates in the developer tools.
If the tracker is associated with the person as suggested above.
If there are other non functioning device trackers associated with that person.
If 1 or 2 is not the case, then your best bet is to use IP based home/away tracking or see if you have more luck with other location apps that have a Home Assistant integration. But I’m guessing these will have similar problems if the custom rom location services are not fully compatible.
If all 4 points are ok, then make sure the phone is not set to optimize battery for the Home Assistant app, and that you do not close the app in the background yourself. Home Assistant needs to have something running in the background to send the phone’s location to Home assistant.
If Home/away is all you are interested in, detecting if (fixed) ip address is present on the network is the most reliable. That is not depending on ROM compatibility, GPS or any app.
Sorry, I think I have explained myself badly. The user in HA already has a device_tracker entity configured. The sensors of my mobile appear correctly, temperature, battery, wifi connected, etc. But the location option does not appear.
Also simlar issue for me, in the device which is linked to the person the geocoded location shows just fine. Just the location of the person itself is not reflecting that position. Also once I turn the geocoded location off in the app the presence of the person will show as Away. Once turned back on it is back to unknown. For my wife with an iPhone (me on Android) it works just fine.