Make sonos ssdp discovery callback a callback function (#113107)
This commit is contained in:
parent
487ae1786f
commit
6ff8d7d2b9
2 changed files with 4 additions and 3 deletions
|
@ -493,7 +493,8 @@ class SonosDiscoveryManager:
|
|||
self.hass, f"{SONOS_SPEAKER_ACTIVITY}-{uid}", source
|
||||
)
|
||||
|
||||
async def _async_ssdp_discovered_player(
|
||||
@callback
|
||||
def _async_ssdp_discovered_player(
|
||||
self, info: ssdp.SsdpServiceInfo, change: ssdp.SsdpChange
|
||||
) -> None:
|
||||
uid = info.upnp[ssdp.ATTR_UPNP_UDN]
|
||||
|
|
|
@ -240,8 +240,8 @@ async def silent_ssdp_scanner(hass):
|
|||
def discover_fixture(soco):
|
||||
"""Create a mock soco discover fixture."""
|
||||
|
||||
async def do_callback(hass, callback, *args, **kwargs):
|
||||
await callback(
|
||||
def do_callback(hass, callback, *args, **kwargs):
|
||||
callback(
|
||||
ssdp.SsdpServiceInfo(
|
||||
ssdp_location=f"http://{soco.ip_address}/",
|
||||
ssdp_st="urn:schemas-upnp-org:device:ZonePlayer:1",
|
||||
|
|
Loading…
Add table
Reference in a new issue