From 16c6d792658f0fada75137d1331a376b6ae667f8 Mon Sep 17 00:00:00 2001 From: Kevin Worrel <37058192+dieselrabbit@users.noreply.github.com> Date: Mon, 18 Apr 2022 23:51:05 -0700 Subject: [PATCH] Screenlogic config: Filter unexpected host names (#70256) --- homeassistant/components/screenlogic/config_flow.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/screenlogic/config_flow.py b/homeassistant/components/screenlogic/config_flow.py index 260317dca11..1aeedfb421d 100644 --- a/homeassistant/components/screenlogic/config_flow.py +++ b/homeassistant/components/screenlogic/config_flow.py @@ -35,8 +35,9 @@ async def async_discover_gateways_by_unique_id(hass): return discovered_gateways for host in hosts: - mac = _extract_mac_from_name(host[SL_GATEWAY_NAME]) - discovered_gateways[mac] = host + if (name := host[SL_GATEWAY_NAME]).startswith("Pentair:"): + mac = _extract_mac_from_name(name) + discovered_gateways[mac] = host _LOGGER.debug("Discovered gateways: %s", discovered_gateways) return discovered_gateways