mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +00:00
Ignore non-Sonos SSDP devices with Sonos-like identifiers (#59809)
This commit is contained in:
parent
9aa41be8b7
commit
81e02a39df
@ -267,11 +267,13 @@ class SonosDiscoveryManager:
|
||||
if change == ssdp.SsdpChange.BYEBYE:
|
||||
return
|
||||
|
||||
uid = info.get(ssdp.ATTR_UPNP_UDN)
|
||||
if not uid.startswith("uuid:RINCON_"):
|
||||
return
|
||||
|
||||
uid = uid[5:]
|
||||
discovered_ip = urlparse(info[ssdp.ATTR_SSDP_LOCATION]).hostname
|
||||
boot_seqnum = info.get("X-RINCON-BOOTSEQ")
|
||||
uid = info.get(ssdp.ATTR_UPNP_UDN)
|
||||
if uid.startswith("uuid:"):
|
||||
uid = uid[5:]
|
||||
self.async_discovered_player(
|
||||
"SSDP", info, discovered_ip, uid, boot_seqnum, info.get("modelName"), None
|
||||
)
|
||||
|
@ -93,7 +93,7 @@ def discover_fixture(soco):
|
||||
async def do_callback(hass, callback, *args, **kwargs):
|
||||
await callback(
|
||||
{
|
||||
ssdp.ATTR_UPNP_UDN: soco.uid,
|
||||
ssdp.ATTR_UPNP_UDN: f"uuid:{soco.uid}",
|
||||
ssdp.ATTR_SSDP_LOCATION: f"http://{soco.ip_address}/",
|
||||
},
|
||||
ssdp.SsdpChange.ALIVE,
|
||||
|
Loading…
x
Reference in New Issue
Block a user