skodaconnect / homeassistant-myskoda

Homeassistant integration for MySkoda.
73 stars 10 forks source link

Crash during driving #1

Closed Prior99 closed 1 month ago

Prior99 commented 1 month ago
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/myskoda/__init__.py", line 80, in _async_update_data
    "vehicles": await self.hub.get_all_vehicles(),
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/myskoda/myskoda.py", line 316, in get_all_vehicles
    return await gather(
           ^^^^^^^^^^^^^
  File "/config/custom_components/myskoda/myskoda.py", line 295, in get_vehicle
    [info, charging, status, air_conditioning, position, health] = await gather(
                                                                   ^^^^^^^^^^^^^
  File "/config/custom_components/myskoda/myskoda.py", line 274, in get_position
    return Position(await response.json())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/myskoda/myskoda.py", line 164, in __init__
    data = data.get("positions")[0]
           ~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
dvx76 commented 1 month ago

Fixed by https://github.com/skodaconnect/myskoda/commit/e3e75bf6f807a2ba15e7d62d1b6cb26ca601e14cI think