Closed palengh closed 3 years ago
This looks like something to do with the entur component itself. If you go to developer tools and look at the entities, can you see those sensors?
Closing this, feel free to re-open if you have any more information.
Hi, there! This issue is still there. Sorry for not getting back earlier. None of the sensors are available in the states view.
Error while setting up entur_public_transport platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/entur_public_transport/sensor.py", line 111, in async_setup_platform
await data.expand_all_quays()
File "/usr/local/lib/python3.8/site-packages/enturclient/api.py", line 108, in expand_all_quays
if len(stop_place["quays"]) > 1:
TypeError: 'NoneType' object is not subscriptable
Hi. By looking at the error message, this seems to be related to the entur integration and not my card...
Hi, there! This issue is still there. Sorry for not getting back earlier. None of the sensors are available in the states view.
Error while setting up entur_public_transport platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/entur_public_transport/sensor.py", line 111, in async_setup_platform await data.expand_all_quays() File "/usr/local/lib/python3.8/site-packages/enturclient/api.py", line 108, in expand_all_quays if len(stop_place["quays"]) > 1: TypeError: 'NoneType' object is not subscriptable
I also stumbled on this error.
I figured the entur integration somehow got loaded before the configuration.YAML is read. which got me thinking: Perhaps the Entur Card is forcing the Entur integration to load up at the same time as Lovelace, which iguess in result also means it's loading up before the configuration.YAML is initialized.
Anyhow, i solved the error by uninstalling the Entur-card, and then i restarted the Core. Upon booting up all the sensors was loaded as expected. I then installed the card again and now everything is running as expected.
So, to reproduce this error:
This error occured the last days...
Logger: homeassistant.components.sensor Source: components/entur_public_transport/sensor.py:112 Integration: sensor (documentation, issues) First occurred: 15:02:26 (1 occurrences) Last logged: 15:02:26
Error while setting up entur_public_transport platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 200, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/entur_public_transport/sensor.py", line 112, in async_setup_platform await data.expand_all_quays() File "/usr/local/lib/python3.8/site-packages/enturclient/api.py", line 108, in expand_all_quays if len(stop_place["quays"]) > 1: TypeError: 'NoneType' object is not subscriptable
The sensors are defined here: