Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on device update when using stop_code / route_code #37

Open
Toets opened this issue Jan 13, 2023 · 1 comment
Open

Error on device update when using stop_code / route_code #37

Toets opened this issue Jan 13, 2023 · 1 comment

Comments

@Toets
Copy link

Toets commented Jan 13, 2023

I get an error when I use the combination of stop_code and route_code. To be sure I used your first example as a test. This example generates the exact same error :

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 503, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 729, in async_device_update
await task
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/ovapi/sensor.py", line 213, in update
stops = itertools.islice(data[self._stop_code][self._route_code]['Passes'].values(), 50)
KeyError: '32009505'

@IIIdefconIII
Copy link
Contributor

IIIdefconIII commented Jan 13, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants