djtimca / haomnilogic

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

error doing job #54

Open momoz opened 11 months ago

momoz commented 11 months ago

Not sure if this is impacting why it doesn't update the pump switch sometimes. I've had an issue where the integration doesn't get or realize that the pump is off after the scheduled turn off in the OmniLogic scheduler.

Logger: homeassistant Source: custom_components/omnilogic/sensor.py:171 Integration: Omnilogic (documentation, issues) First occurred: 10:10:36 AM (3 occurrences) Last logged: 10:11:06 AM

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1163, in _async_registry_updated self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 745, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in _async_write_ha_state state, attr = self._async_generate_attributes() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 786, in _async_generate_attributes state = self._stringify_state(available) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 751, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 501, in state value = self.native_value ^^^^^^^^^^^^^^^^^ File "/config/custom_components/omnilogic/sensor.py", line 171, in native_value return state ^^^^^ UnboundLocalError: cannot access local variable 'state' where it is not associated with a value

momoz commented 11 months ago

Oh, I saw a previous issue logged for the same thing and I did uninstall and reinstall the integration.