skodaconnect / homeassistant-myskoda

Homeassistant integration for MySkoda.
8 stars 3 forks source link

RuntimeError: coroutine raised StopIteration #48

Open sonar98 opened 6 days ago

sonar98 commented 6 days ago

I've been running 1.4.2 a couple of hours now. Looks a lot more stable. When looking at the log files I see two errors:

Logger: myskoda.mqtt
Bron: runner.py:189
Eerst voorgekomen: 13:18:32 (1 gebeurtenissen)
Laatst gelogd: 13:18:32

Failed to connect to MQTT.

Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.myskoda.coordinator
Bron: helpers/debounce.py:137
integratie: MySkoda (documentatie, problemen)
Eerst voorgekomen: 13:19:30 (7 gebeurtenissen)
Laatst gelogd: 13:51:44

Unexpected exception from <bound method MySkodaDataUpdateCoordinator._update_vehicle of <custom_components.myskoda.coordinator.MySkodaDataUpdateCoordinator object at 0x7fe5cf943bf0>>
Traceback (most recent call last):
  File "/config/custom_components/myskoda/coordinator.py", line 183, in _update_vehicle
    self.set_updated_vehicle(vehicle)
  File "/config/custom_components/myskoda/coordinator.py", line 157, in set_updated_vehicle
    self.async_set_updated_data(self.data)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 489, in async_set_updated_data
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 533, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/config_entry.py", line 238, in state
    if self.latitude is not None and self.longitude is not None:
       ^^^^^^^^^^^^^
  File "/config/custom_components/myskoda/device_tracker.py", line 66, in latitude
    position = self._vehicle_position()
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/myskoda/device_tracker.py", line 54, in _vehicle_position
    return next(
           ^^^^^
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 137, in _handle_timer_finish
    await task
RuntimeError: coroutine raised StopIteration
WebSpider commented 2 days ago

This will be fixed by #61