Screenlogic config: Filter unexpected host names (#70256)

pull/70171/head^2
Kevin Worrel 2022-04-18 23:51:05 -07:00 committed by GitHub
parent 3fa3ee9ea2
commit 16c6d79265
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

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