From 069818940e5a16c412544e1e14e69b5d0964f157 Mon Sep 17 00:00:00 2001 From: Hung Nguyen Date: Sun, 2 Oct 2022 09:47:07 -0700 Subject: [PATCH] Skip parsing Flume sensors without location (#79456) --- homeassistant/components/flume/sensor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/flume/sensor.py b/homeassistant/components/flume/sensor.py index b9b5f819520..6d68058732d 100644 --- a/homeassistant/components/flume/sensor.py +++ b/homeassistant/components/flume/sensor.py @@ -40,7 +40,10 @@ async def async_setup_entry( flume_entity_list = [] for device in flume_devices.device_list: - if device[KEY_DEVICE_TYPE] != FLUME_TYPE_SENSOR: + if ( + device[KEY_DEVICE_TYPE] != FLUME_TYPE_SENSOR + or KEY_DEVICE_LOCATION not in device + ): continue device_id = device[KEY_DEVICE_ID]