cozylife / hass_cozylife_local_pull

home asstiant plugin
103 stars 43 forks source link

Error log: Task exception was never retrieved #11

Open draon7 opened 1 year ago

draon7 commented 1 year ago

I have problems setting up my led strip, I am getting multiple same errors in the log.

2023-02-08 22:13:18.671 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 813, in _update_entity_states await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 982, in state if (is_on := self.is_on) is None: File "/config/custom_components/hass_cozylife_local_pull/light.py", line 150, in is_on self._refresh_state() File "/config/custom_components/hass_cozylife_local_pull/light.py", line 127, in _refresh_state self._attr_is_on = 0 < self._state['1'] KeyError: '1'

cozylife commented 1 year ago

Hello. I think your lamp doesn't support the dpid=1 feature, currently it doesn't work in the haas plugin.