-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frequent error in switch.py in homeassistant logs. #9
Comments
I'm also seeing this. |
This is an issue when for some reason a client gets wrongfully marked as being powered by poe. I haven't figured out what characteristics that makes this happen. It is also problematic to do since it doesn't happen too often and what is needed is the snapshot of the client and device at the time of creating the entity. A poor work around is to disable and then enable POE control to get rid of the faulty entities. But I think it will not be a part of hass until next release 0.109 |
@bdraco would you mind investigating this yourself? There must be some data in the client that can be used to not create a poe switch |
I forgot I even opened this. I haven't had a chance to get unifi re-enabled since the UDMP switch over. I'll take a look as soon as I can. |
There is no rush. This issue has existed for a long time, it is hard to catch it in the act and I've prioritised improving other aspects of UniFi. |
I just re-enabled and I haven't seen this pop up. It used to stream down the log. I'll report back in a few days to so if it happens over time. |
No longer happening |
Not impossible that it will come back. I'd be surprised if I solved it earlier this year 🤪 |
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'
2019-12-09 04:29:24 ERROR (MainThread) [aiounifi.api] Couldn't find key: 'None'
2019-12-09 04:29:24 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
The text was updated successfully, but these errors were encountered: