Ensure a proper scope_id is given for IPv6 addresses when initializing the SSDP component (#86975)

fixes undefined
This commit is contained in:
Steven Looman
2023-01-30 23:47:40 -05:00
committed by Paulus Schoutsen
parent dc50a6899a
commit 6a9f06d36e
+3 -1
View File
@@ -202,7 +202,9 @@ async def async_build_source_set(hass: HomeAssistant) -> set[IPv4Address | IPv6A
return {
source_ip
for source_ip in await network.async_get_enabled_source_ips(hass)
if not source_ip.is_loopback and not source_ip.is_global
if not source_ip.is_loopback
and not source_ip.is_global
and (source_ip.version == 6 and source_ip.scope_id or source_ip.version == 4)
}