Screenlogic config: Filter unexpected host names (#70256)

This commit is contained in:
Kevin Worrel
2022-04-18 23:51:05 -07:00
committed by GitHub
parent 3fa3ee9ea2
commit 16c6d79265

View File

@@ -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