HomeAssistant-Mods / home-assistant-miele

Miele integration for Home assistant
141 stars 30 forks source link

IndexError: list index out of range #84

Open nagyrobi opened 2 years ago

nagyrobi commented 2 years ago

Getting this every 5 secs since today:

2021-12-06 13:31:21 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 473, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 519, in _async_write_ha_state
    state = self._stringify_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 492, in _stringify_state
    if (state := self.state) is None:
  File "/config/custom_components/miele/sensor.py", line 712, in state
    state_value = self._device["state"][self._key][self._index]["value_raw"]
IndexError: list index out of range
kloknibor commented 2 years ago

This normally means no data was retrieved from the miele API. Please check here: https://www.miele.com/developer/swagger-ui/swagger.html with the exact same credentials if you get any data from miele.

elliottwalker commented 2 years ago

I'm getting this same error:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 520, in async_update_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 "/config/custom_components/miele/sensor.py", line 725, in state state_value = self._device["state"][self._key][self._index]["value_raw"]

I confirmed I am receiving data with my same credentials via the Miele API page. I see both of my Miele devices in the response.

What info can I provide to help debug?