Unifi - Couldn't find key: 'None'

Here also this famous message.
In about 20hours (1 day logging) I have 6100 lines of this message.
So about 300 the hour :blush:

The line comes in companion with the following lines;

AttributeError: 'NoneType' object has no attribute 'ports',
2019-11-28 19:49:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved,
Traceback (most recent call last):,
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 275, in async_update_ha_state,
    self._async_write_ha_state(),
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 309, in _async_write_ha_state,
    state = self.state,
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 576, in state,
    return STATE_ON if self.is_on else STATE_OFF,
  File "/usr/src/homeassistant/homeassistant/components/unifi/switch.py", line 204, in is_on,
    return self.port.poe_mode != "off",
  File "/usr/src/homeassistant/homeassistant/components/unifi/switch.py", line 249, in port,
    return self.device.ports[self.client.sw_port],
AttributeError: 'NoneType' object has no attribute 'ports',

Also the logbook writes:

Error doing job: Task exception was never retrieved
21:04 components/unifi/switch.py (ERROR) - bericht kwam voor het eerst om 19:08 en verschijnt 4272 malen

Couldn’t find key: ‘None’
21:04 components/unifi/switch.py (ERROR) - bericht kwam voor het eerst om 19:08 en verschijnt 4272 malen

removed the integration from my config and strangly the errors are gone :slight_smile:

Thinking outside the box :ok_hand:

1 Like

Hey Robban, noticed you did some work on Unifi, still in the pipeline i believe. Just to add i have about a few thousands of those error messages.

Couldn't find key: 'None'

Same for

Error doing job: Task exception was never retrieved

I also see some switches from the unifi too indeed. Always thought those where WOL switches of some sort.

Is it good to wait for the next release before attempting a remove/add? a new version just came out, i’ll give that a go and remove/add :wink:

1 Like

I think this usually happen when someone who will not really join your network walks past your house but it connects shortly to your APs. I see reports of entities named something like unifi_00_00_00_… so what I need here are data describing the clients to see if we can pinpoint them by metadata combined with the serial number or something

I tried the latest version of HA and i no longer see those errors. As in, if i see them its so low volume that it doesn’t raise any alarms. My logs keeps clean now :wink:

1 Like