From 50373500c3ec20deb04d7cf1d1f6f40f8ef159b9 Mon Sep 17 00:00:00 2001 From: Steven Looman Date: Mon, 30 Jan 2023 22:14:48 +0100 Subject: [PATCH] Ensure a proper scope_id is given for IPv6 addresses when initializing the SSDP component (#86975) fixes undefined --- homeassistant/components/ssdp/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/ssdp/__init__.py b/homeassistant/components/ssdp/__init__.py index 18ed063c8bc..c2f56bb7b4a 100644 --- a/homeassistant/components/ssdp/__init__.py +++ b/homeassistant/components/ssdp/__init__.py @@ -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) }