mirror of
https://github.com/home-assistant/core.git
synced 2025-06-03 04:37:15 +00:00
Do no crash Luftdaten on additional data returned by the API (#37763)
This commit is contained in:
parent
5b3d094a1e
commit
d8c2732bcb
@ -30,7 +30,12 @@ async def async_setup_entry(hass, entry, async_add_entities):
|
||||
|
||||
sensors = []
|
||||
for sensor_type in luftdaten.sensor_conditions:
|
||||
name, icon, unit = SENSORS[sensor_type]
|
||||
try:
|
||||
name, icon, unit = SENSORS[sensor_type]
|
||||
except KeyError:
|
||||
_LOGGER.debug("Unknown sensor value type: %s", sensor_type)
|
||||
continue
|
||||
|
||||
sensors.append(
|
||||
LuftdatenSensor(
|
||||
luftdaten, sensor_type, name, icon, unit, entry.data[CONF_SHOW_ON_MAP]
|
||||
|
Loading…
x
Reference in New Issue
Block a user