I had unifi device_tracker working perfectly until I tried to use templates to change the state of my network gear to up/down instead of home away. I have removed that configuration that was supposed to change the state and after all my device_tracker entities were showing away.
I ended up removing the known_devices file and Since then I have not been able to get it working again.
There are no entries being created in known_devices.yaml and I am getting the logs below.
Also for some reason I upgraded hass.io to 0.97.0b0 at one point when I thought things were working properly for a moment.
Here is my relevent config and logs.
- platform: unifi
host: x.x.x.x
username: xxxxx
password: xxxxx
site_id: default
verify_ssl: false
interval_seconds: 10
consider_home: 180
new_device_defaults:
track_new_devices: true
2019-08-02 20:53:39 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.unifi
2019-08-02 20:53:39 DEBUG (MainThread) [homeassistant.components.unifi.device_tracker] New UniFi client tracker xxx (xx:xx:x:x:x:xx)
2019-08-02 20:53:39 DEBUG (MainThread) [homeassistant.components.unifi.device_tracker] New UniFi client tracker xxx (xx:xx:x:x:x:xx)
2019-08-02 20:53:39 DEBUG (MainThread) [homeassistant.components.unifi.device_tracker] New UniFi client tracker xxx (xx:xx:x:x:x:xx)
2019-08-02 20:53:39 DEBUG (MainThread) [homeassistant.components.unifi.device_tracker] New UniFi client tracker xxx (xx:xx:x:x:x:xx)
2019-08-02 20:53:39 DEBUG (MainThread) [homeassistant.components.unifi.device_tracker] New UniFi client tracker xxx (xx:xx:x:x:x:xx)
2019-08-02 20:53:39 DEBUG (MainThread) [homeassistant.components.unifi.device_tracker] New UniFi client tracker xxx (xx:xx:x:x:x:xx)
2019-08-02 20:53:39 DEBUG (MainThread) [homeassistant.components.unifi.device_tracker] New UniFi device tracker xxx (xx:xx:x:x:x:xx)
2019-08-02 20:53:39 DEBUG (MainThread) [homeassistant.components.unifi.device_tracker] New UniFi device tracker xxx (xx:xx:x:x:x:xx)
2019-08-02 20:53:39 DEBUG (MainThread) [homeassistant.components.unifi.device_tracker] New UniFi device tracker xxx (xx:xx:x:x:x:xx)
2019-08-02 20:53:39 DEBUG (MainThread) [homeassistant.components.unifi.device_tracker] New UniFi device tracker xxx (xx:xx:x:x:x:xx)
2019-08-02 20:53:39 DEBUG (MainThread) [homeassistant.components.unifi.device_tracker] New UniFi device tracker xxx (xx:xx:x:x:x:xx)
2019-08-02 20:53:39 INFO (MainThread) [homeassistant.setup] Setting up ios
2019-08-02 20:53:39 INFO (MainThread) [homeassistant.setup] Setup of domain weather took 3.1 seconds.
2019-08-02 20:53:39 INFO (MainThread) [homeassistant.setup] Setting up stream
2019-08-02 20:53:39 INFO (MainThread) [homeassistant.setup] Setup of domain stream took 0.0 seconds.
2019-08-02 20:53:39 INFO (MainThread) [homeassistant.components.weather] Setting up weather.met
2019-08-02 20:53:39 INFO (MainThread) [homeassistant.setup] Setup of domain default_config took 0.2 seconds.
2019-08-02 20:53:39 INFO (MainThread) [homeassistant.setup] Setup of domain ios took 0.1 seconds.
2019-08-02 20:53:39 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 399, in _async_add_entity await entity.async_update_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 254, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in _async_write_ha_state state = self.state File "/usr/src/homeassistant/homeassistant/components/device_tracker/config_entry.py", line 126, in state if self.is_connected: File "/usr/src/homeassistant/homeassistant/components/unifi/device_tracker.py", line 284, in is_connected dt_util.utcnow() - dt_util.utc_from_timestamp(float(self.device.last_seen)) File "/usr/local/lib/python3.7/site-packages/aiounifi/devices.py", line 57, in last_seen return self.raw['last_seen'] KeyError: 'last_seen'