skodaconnect / homeassistant-skodaconnect

Skoda Connect - A home assistant plugin to add integration with your car
Apache License 2.0
232 stars 28 forks source link

Exception: Task exception was never retrieved #152

Closed ChristophCaina closed 1 year ago

ChristophCaina commented 1 year ago

Describe the bug I'm getting the following error exception in the HA Logs:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant
Source: custom_components/skodaconnect/binary_sensor.py:53
Integration: Skoda Connect (documentation, issues)
First occurred: 14:31:33 (2 occurrences)
Last logged: 15:05:49

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 316, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 121, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/components/binary_sensor/__init__.py", line 211, in state
    if (is_on := self.is_on) is None:
  File "/config/custom_components/skodaconnect/binary_sensor.py", line 53, in is_on
    return self.instrument.is_on
  File "/usr/local/lib/python3.10/site-packages/skodaconnect/dashboard.py", line 188, in is_on
    return self.state
  File "/usr/local/lib/python3.10/site-packages/skodaconnect/dashboard.py", line 172, in state
    val = super().state
  File "/usr/local/lib/python3.10/site-packages/skodaconnect/dashboard.py", line 62, in state
    return self.vehicle.get_attr(self.attr)
  File "/usr/local/lib/python3.10/site-packages/skodaconnect/vehicle.py", line 1168, in get_attr
    return find_path(self.attrs, attr)
  File "/usr/local/lib/python3.10/site-packages/skodaconnect/utilities.py", line 86, in find_path
    return find_path(src[path[0]], path[1:])
KeyError: 'parking_light'

Latest working release unknown

Debug logs If applicable, add debug logs. See README on how to enable debug logs with response debugging.

Installation:

Farfar commented 1 year ago

Same root cause as in issue #151