Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Crash during driving #3

Open
Prior99 opened this issue Sep 11, 2024 · 0 comments
Open

Crash during driving #3

Prior99 opened this issue Sep 11, 2024 · 0 comments

Comments

@Prior99
Copy link
Owner

Prior99 commented Sep 11, 2024

While driving the car, GPS position is unavailable and the integration will crash when trying to load it

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant