You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2018-12-12 20:02:43 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform entur_public_transport
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/entur_public_transport.py", line 80, in setup_platform
data = EnturPublicTransportData(API_CLIENT_NAME, stops, quays, expand)
File "/usr/local/lib/python3.6/site-packages/enturclient/api.py", line 27, in __init__
self._expand_all_quays()
File "/usr/local/lib/python3.6/site-packages/enturclient/api.py", line 74, in _expand_all_quays
if len(stop_place['quays']) > 1:
TypeError: 'NoneType' object is not subscriptable
Additional information:
The text was updated successfully, but these errors were encountered:
aherbjornsen
changed the title
entur_public_transport - fails if no stations defined
entur_public_transport - fails if no "StopPlace" defined
Dec 12, 2018
If you set expand_platforms: false it should work without the *:StopPlace:* in the configuration.
The *:Quay:* ids are the platforms coming from the stations found in EnTur's systems, so the expand_platforms would only be useful with a *:StopPlace:* in the config.
Throwing an exception is a bug, so I would have to fix that, but this should work for now, @aherbjornsen 😃
Yes, I can confirm that when setting expand_platforms: false it does work.
I can live with that (I could even live with a "dummy" stop). @hfurubotten Thanks.
Home Assistant release with the issue: 0.84.0b4
Last working Home Assistant release (if known):
Operating environment (Hass.io/Docker/Windows/etc.): Hass.io on Ubuntu
Component/platform: https://www.home-assistant.io/components/sensor.entur_public_transport/
Description of problem: Component fails if only "Quay" is defined, adding a "StopPlace" line resolves the problem
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information:
The text was updated successfully, but these errors were encountered: