Aohzan / ipx800

IPX800 V4 integration for Home-Assistant
Apache License 2.0
20 stars 12 forks source link

Error in HA #32

Closed Jym4632 closed 1 year ago

Jym4632 commented 1 year ago

Dear,

i have this error every 30 second.

Where is the problem?

Thanks

2022-09-19 19:32:07.127 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 151, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 110, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 348, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 533, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 571, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 539, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 970, in state
    if (is_on := self.is_on) is None:
  File "/config/custom_components/ipx800v4/switch.py", line 68, in is_on
    return self.coordinator.data[f"R{self._id}"] == 1
KeyError: 'R1'
Aohzan commented 1 year ago

The IPX800 doesn't send the states information to HA did you do an update of the IPX800 ?

Jym4632 commented 1 year ago

Firmware Version 4.04.06

Aohzan commented 1 year ago

It's an old version but this is not the problem. If you reboot the IPX do you still have the error ? Same for HA ?

Jym4632 commented 1 year ago

updated to 4.04.12, rebooted, and fixed.

Thank you very much