zachcheatham / ha-omada

Home Assistant TP-Link Omada Integration
186 stars 26 forks source link

Device doesn't have "radioId" #63

Closed contagon closed 1 year ago

contagon commented 1 year ago

I just started seeing this error after updating to 0.4.0. I attempted to remove & re add the integration, but it still comes up.

Let me know if there's any debugging you'd have me do to dig into this some.

2023-03-18 13:59:41.691 ERROR (MainThread) [homeassistant.util.logging] Exception in async_update when dispatching 'omada-update-e99f04ecd84b35f9bd3257ae25b14e14': ()
Traceback (most recent call last):
  File "/config/custom_components/omada/omada_entity.py", line 111, in async_update
    self.async_write_ha_state()
  File "/usr/lib/python3.10/site-packages/homeassistant/helpers/entity.py", line 559, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/lib/python3.10/site-packages/homeassistant/helpers/entity.py", line 603, in _async_write_ha_state
    attr.update(self.extra_state_attributes or {})
  File "/config/custom_components/omada/device_tracker.py", line 245, in extra_state_attributes
    return self.entity_description.extra_attributes_fn(self.controller, self._mac)
  File "/config/custom_components/omada/device_tracker.py", line 108, in client_attributes_fn
    if hasattr(client, k) and getattr(client, k):
  File "/config/custom_components/omada/api/clients.py", line 90, in radio
    return RADIO[self._raw.get("radioId")]
TypeError: list indices must be integers or slices, not NoneType
contagon commented 1 year ago

Just updated to 0.4.1 and it looks like your fix for it worked. Thanks for the quick update and for your work on this!