@robmarkcole (because I think you wrote the component?)
Is anyone else having problems with this?
I just want to check whether it is just me. My log was flooded with errors from this component last night so I restarted and now it won’t even set up the platform (I particularly like the KeyError
at the bottom!)
2018-12-29 09:41:00 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform london_underground
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/london_underground.py", line 49, in setup_platform
data.update()
File "/usr/local/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 324, in wrapper
result = method(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/london_underground.py", line 113, in update
self.data = parse_api_response(response.json())
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/london_underground.py", line 130, in parse_api_response
[status['reason'] for status in line['lineStatuses']])
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/london_underground.py", line 130, in <listcomp>
[status['reason'] for status in line['lineStatuses']])
KeyError: 'reason'