Update to 0.106.2 problem

I updated to 0.106.2:

core-ssh:~# hassio homeassistant info
arch: armv7
boot: true
custom: false
image: homeassistant/raspberrypi3-homeassistant
ip_address: 172.30.32.1
last_version: 0.106.2
machine: raspberrypi3
port: 8123
ssl: false
version: 0.106.2
wait_boot: 600
watchdog: true

However I can no longer get to the dashboard. Port 8123 is non responding.

“hassio homassistant” logs give me:

2020-03-01 16:23:20 INFO (MainThread) [homeassistant.setup] Setting up stream
2020-03-01 16:23:20 INFO (MainThread) [homeassistant.setup] Setup of domain stream took 0.0 seconds.
2020-03-01 16:23:20 INFO (MainThread) [homeassistant.setup] Setup of domain default_config took 0.2 seconds.
2020-03-01 16:23:21 ERROR (MainThread) [aiounifi.api] Couldn't find key: None
2020-03-01 16:23:21 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 434, in _async_add_entity
    await entity.async_update_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 284, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state
    state = self.state
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 602, in state
    return STATE_ON if self.is_on else STATE_OFF
  File "/usr/src/homeassistant/homeassistant/components/unifi/switch.py", line 174, in is_on
    return self.port.poe_mode != "off"
  File "/usr/src/homeassistant/homeassistant/components/unifi/switch.py", line 220, in port
    return self.device.ports[self.client.sw_port]
AttributeError: 'NoneType' object has no attribute 'ports'
2020-03-01 16:23:21 INFO (MainThread) [homeassistant.setup] Setup of domain hassio took 1.8 seconds.
2020-03-01 16:23:21 INFO (SyncWorker_16) [homeassistant.loader] Loaded google_translate from homeassistant.components.google_translate
2020-03-01 16:23:21 INFO (MainThread) [homeassistant.setup] Setting up tts
2020-03-01 16:23:21 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 0.0 seconds.

Does that mean that for some reason the server wasn’t started correctly? How do I fix this?

You have problem with API key.

  File "/usr/src/homeassistant/homeassistant/components/unifi/switch.py", line 174, in is_on
    return self.port.poe_mode != "off"
  File "/usr/src/homeassistant/homeassistant/components/unifi/switch.py", line 220, in port
    return self.device.ports[self.client.sw_port]
AttributeError: 'NoneType' object has no attribute 'ports'

And also with switch/ports.

Check https://www.home-assistant.io/integrations/#search/unifi

You have problem with API key.

Could you clarify that statement? The error seems pretty nondescript.

ERROR (MainThread) [aiounifi.api] Couldn’t find key: None

I have the exact same errors as @kristvanbesien

My previous research indicates that the unifi integration is getting confused in thinking some entity has POE ports and then returns errors when it tries to access POE meta data. I’ve resorted to deleting entities and even removing and reinstalling the integration. Only to have the same errors come back sometime later. I’ve been seeing these since before 0.96 and they still haunt my log files in version 0.106.5.

All the while the unifi integration otherwise just works.