wernerhp / ha.integration.load_shedding

A Home Assistant integration to track your load schedding schedule.
MIT License
115 stars 21 forks source link

Error in HA Log files #29

Closed ZAAJR closed 2 years ago

ZAAJR commented 2 years ago

Hi @wernerhp

I've upgraded to v0.6.1 which is working well, except I noticed the following error in the log files:

This error originated from a custom integration.

Logger: homeassistant Source: custom_components/load_shedding/sensor.py:664 Integration: Load Shedding (documentation, issues) First occurred: 28 October 2022 at 16:33:16 (1104 occurrences) Last logged: 10:56:59

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 "/config/custom_components/load_shedding/sensor.py", line 533, 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 574, in _async_write_ha_state attr.update(self.extra_state_attributes or {}) File "/config/custom_components/load_shedding/sensor.py", line 525, in extra_state_attributes self._attrs.update(clean(data)) File "/config/custom_components/load_shedding/sensor.py", line 664, in clean if data[key] == value: TypeError: list indices must be integers or slices, not str

Let me know if you need any more details?

Thanks!

wernerhp commented 2 years ago

Fixed