Describe the bug
Yesterday most of entities provided by hOn integration have disappeared and the following error started to spam HA logs:
2024-02-14 12:11:37.272 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 243, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 399, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 182, in async_update_listeners
update_callback()
File "/config/custom_components/hon/hon.py", line 107, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 945, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1066, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1002, in __async_calculate_state
available = self.available # only call self.available once per update cycle
^^^^^^^^^^^^^^
File "/config/custom_components/hon/switch.py", line 489, in available
and int(self._device.get("remoteCtrValid", 1)) == 1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'false'
I'm not sure what exactly might have caused that but my suspicions are directed towards my HD80-A3959 tumble dryer (device log attached) as I reconnected it after a couple of months of not being used, around the time of the first log entry appeared. However I haven't seen this error before the dryer was disconnected.
I've changed the line indicated by the exception to
and self._device.get("remoteCtrValid")
and it fixed the issue but I'm not pushing this change as a PR to the repo because I'm not sure it won't break something else.
Expected behavior
No error in the logs and all entities available.
Describe the bug Yesterday most of entities provided by hOn integration have disappeared and the following error started to spam HA logs:
I'm not sure what exactly might have caused that but my suspicions are directed towards my HD80-A3959 tumble dryer (device log attached) as I reconnected it after a couple of months of not being used, around the time of the first log entry appeared. However I haven't seen this error before the dryer was disconnected.
I've changed the line indicated by the exception to
and it fixed the issue but I'm not pushing this change as a PR to the repo because I'm not sure it won't break something else.
Expected behavior No error in the logs and all entities available.
Environment:
2023.1.6
0.13.0
0.16.0
Device Log