mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Ignore Sonos Boost devices during discovery (#52845)
This commit is contained in:
parent
9308fa28e7
commit
2b6a3716e8
@ -46,6 +46,7 @@ _LOGGER = logging.getLogger(__name__)
|
||||
|
||||
CONF_ADVERTISE_ADDR = "advertise_addr"
|
||||
CONF_INTERFACE_ADDR = "interface_addr"
|
||||
DISCOVERY_IGNORED_MODELS = ["Sonos Boost"]
|
||||
|
||||
|
||||
CONFIG_SCHEMA = vol.Schema(
|
||||
@ -233,6 +234,9 @@ async def async_setup_entry( # noqa: C901
|
||||
|
||||
@callback
|
||||
def _async_discovered_player(info):
|
||||
if info.get("modelName") in DISCOVERY_IGNORED_MODELS:
|
||||
_LOGGER.debug("Ignoring device: %s", info.get("friendlyName"))
|
||||
return
|
||||
uid = info.get(ssdp.ATTR_UPNP_UDN)
|
||||
if uid.startswith("uuid:"):
|
||||
uid = uid[5:]
|
||||
|
@ -511,7 +511,7 @@ class SonosSpeaker:
|
||||
await self.async_unsubscribe()
|
||||
|
||||
if not will_reconnect:
|
||||
self.hass.data[DATA_SONOS].ssdp_known.remove(self.soco.uid)
|
||||
self.hass.data[DATA_SONOS].ssdp_known.discard(self.soco.uid)
|
||||
self.async_write_entity_states()
|
||||
|
||||
async def async_rebooted(self, soco: SoCo) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user