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: homeassistantSource: custom_components/load_shedding/sensor.py:664Integration: 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 retrievedTraceback (most recent call last):File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 151, in _handle_refresh_intervalawait self._async_refresh(log_failures=True, scheduled=True)File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refreshself.async_update_listeners()File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 110, in async_update_listenersupdate_callback()File "/config/custom_components/load_shedding/sensor.py", line 533, in _handle_coordinator_updateself.async_write_ha_state()File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 533, in async_write_ha_stateself._async_write_ha_state()File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 574, in _async_write_ha_stateattr.update(self.extra_state_attributes or {})File "/config/custom_components/load_shedding/sensor.py", line 525, in extra_state_attributesself._attrs.update(clean(data))File "/config/custom_components/load_shedding/sensor.py", line 664, in cleanif data[key] == value:TypeError: list indices must be integers or slices, not str
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!