Device_tracker state unknown + log errors

For the past few weeks, the device_tracker entities for the mobile_app component have not been updating from the IOS app, and always show a state of ‘unknown’.

I am able to see from the logs on the IOS app that the location is being updated and is properly detecting when entering and leaving zones, but those updates appear to be failing when reaching home assistant. All other entities/sensors created within Home Assistant appear to be updating, including the geocoded location - it is only the device_tracker that doesn’t update and remains in ‘unknown’.

I am also seeing a lot of these error messages in the log file that seems to occur with each attempted location update:

2020-03-08 14:03:40 ERROR (MainThread) [homeassistant.util.logging] Exception in update_data when dispatching 'mobile_app_location_update_695044bd07df44d080481218b1a1eb94': ({'battery': 86, 'altitude': 385.5381736755371, 'speed': 0, 'vertical_accuracy': 4, 'gps_accuracy': 30, 'gps': [37.594757080078125, -97.30747159579518]},)
Traceback (most recent call last):
  File "/srv/hass/lib/python3.7/site-packages/homeassistant/components/mobile_app/", line 156, in update_data
  File "/srv/hass/lib/python3.7/site-packages/homeassistant/helpers/", line 297, in async_write_ha_state
    self._async_write_ha_state()  # type: ignore
  File "/srv/hass/lib/python3.7/site-packages/homeassistant/helpers/", line 320, in _async_write_ha_state
    state = self.state
  File "/srv/hass/lib/python3.7/site-packages/homeassistant/components/device_tracker/", line 100, in state
    self.hass, self.latitude, self.longitude, self.location_accuracy
  File "/srv/hass/lib/python3.7/site-packages/homeassistant/components/zone/", line 102, in async_active_zone
KeyError: 'latitude'

This issue has persisted for the past several weeks for all three mobile phones in the house, and spanned several Home Assistant core updates (0.105 - 0.106.5). I’ve also attempted deleting the mobile_app integrations for each phone, and re-configured each, and disabling the mobile_app: entry in the configuration file after deleting the integrations and re-enabling everything after a restart, with no change in the result.

Any help, suggestions or solutions would be greatly appreciated.

I am seeing this behavior too, did anybody create a bug report?

I haven’t seen one.

Just looked again, and this seems to be the same issue:

1 Like

After updating to Home Assistant Core 0.107.5 this issues seems to have resolved. It’s been working properly for a few days now.

I am on version 0.107.7 and the issue still persists.

Yes also here

I m having the same here