So, this component had been working fine but for the last day or so, I’ve been getting the following error message:
2017-11-05 14:13:43 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform london_air
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py”, line 170, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File “/usr/lib/python3.6/asyncio/tasks.py”, line 352, in wait_for
return fut.result()
File “/usr/lib/python3.6/asyncio/futures.py”, line 244, in result
raise self._exception
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/sensor/london_air.py”, line 64, in setup_platform
data.update()
File “/usr/lib/python3.6/site-packages/homeassistant/util/init.py”, line 306, in wrapper
result = method(*args, **kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/sensor/london_air.py”, line 87, in update
self.data = parse_api_response(response.json())
File “/usr/lib/python3.6/site-packages/homeassistant/components/sensor/london_air.py”, line 209, in parse_api_response
if isinstance(entry[‘Site’], dict):
KeyError: ‘Site’
The Kings College API still seems to be sending data (as far as I can see from the link in the documentation), although maybe the format has changed. My config hasn’t changed, but for completeness it’s the following:
- platform: london_air
locations:
- City of London
- Greenwich
- Islington
- Lewisham
- Southwark
- Tower Hamlets
Any ideas what has happened?