djtimca / haomnilogic

Hayward Omnilogic integration for Home Assistant available through HACS
Apache License 2.0
18 stars 6 forks source link

Error doing job: Task exception was never retrieved #22

Closed sddgit closed 2 years ago

sddgit commented 2 years ago

Getting a lot (thousands) of these (with 1.0.13)

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/omnilogic/sensor.py:105 
Integration: Hayward Omnilogic 
First occurred: June 15, 2022, 2:28:36 PM (2492 occurrences) 
Last logged: 12:55:42 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 137, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 270, in _async_refresh
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 330, 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/components/sensor/__init__.py", line 388, in state
    value = self.native_value
  File "/config/custom_components/omnilogic/sensor.py", line 105, in native_value
    sensor_data = self.coordinator.data[self._item_id][self._state_key]
KeyError: ('Backyard', '157107', 'BOWS', '1')
djtimca commented 2 years ago

That looks like an issue local to your install and login. I suggest removing and reinstalling the integration.

It looks like maybe your system ID has become changed somehow? Not sure.

djtimca commented 2 years ago

I assume this has been resolved since is no additional information.

sddgit commented 2 years ago

Sorry for not getting back before now. I was away for a few days. After a restart of HA, I was getting timeouts and a few other things. So I uninstalled the integration and installed the latest version. So far, it’s been fine, and I’ll keep monitoring. Thanks for following up.