Apart from the syntactical representation of the geolocation, what is the difference between the geocoded_location sensor of the HA Companion vs the corresponding device_tracker?
In my case the device_tracker.xyz of the mobile phone with the HA Companion shows the correct geolocation, but sensor.xyz_geocoded_location shows “unknown”.
Why would the first work and the latter not work?
Assuming I get both to work, which would be the better source to use in Lovelace and for automations?
I noticed the same issue today, and was puzzled. Digging a bit deeper (but not all the way down), it seems like the device_tracker being accurate is an accident. The values are from the initial connection of the HA Companion app, because the sensor.[device]_last_update_trigger is stuck on “Initial”. Many attempts at getting the app to update location, manually or via the various mechanisms to trigger an update, produce the same “Initial” result.
My guess is that the geocoded_location value got overwritten or updated to the “unknown” value, due to a known bug related to invalid data for an empty iPhone eSIM slot causing the entire app update to be rejected on the server. This is one of the GitHub issues: https://github.com/home-assistant/iOS/issues/443 for that problem. However, the device_tracker value never gets updated, and so it’s stuck on something that looks right while I’m at home testing, but probably does not update if I leave the house.
A complete test would involve me actually leaving the house, and seeing if the device_tracker updates but geocoded_location does not. But I’m just too tired to give it the full test.
Last note, the 0.110.5 update has a server-side fix to attempt to work around the invalid data being sent by the mobile app. BUT, it’s apparently causing other problems that render the mobile app sluggish to the point of unusability. So, maybe wait for .6…
@c0revin The 0.110.6 update had similar problems as the .5 update. It was quickly replaced by a .7 update.
I never managed to get that version installed; my Home Assistant VM refused to see it. After restarting everything (and doing some unrelated OS-level updates), I ended up seeing and upgrading to 0.111.0.
Although I’m not a fan of upgrading to a .0 release, especially not on the day of release, in this case it was problem-free, and resolved all of the issues I had been having with the mobile app’s connection to HA.
The mobile app itself needs to be updated to correctly handle an empty eSIM slot, most commonly found on the iPhone 11 Pro [Max]. It’s sending data that’s not quite right, and HA 0.111.0 (correctly) logs errors for each request that includes the invalid data payload. But because of HA’s improved parsing and handling of the updates, the invalid payload no longer prevents the mobile app from updating the other sensors (location, etc.) in HA, which has been a problem for a few months.
It’s my understanding that a 2020.1 update to the iOS mobile app is very close, possibly only days away. That’s great, and I’m looking forward to it. But it’s the update of HA itself to 0.111.0 that fixed the existing problem.