mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Fix referenced before assignment error in sonos speaker (#57924)
This commit is contained in:
parent
9a58bfdf41
commit
d20936d175
@ -528,7 +528,7 @@ class SonosSpeaker:
|
||||
) -> None:
|
||||
"""Make this player unavailable when it was not seen recently."""
|
||||
data = self.hass.data[DATA_SONOS]
|
||||
if callback_timestamp and (zcname := data.mdns_names.get(self.soco.uid)):
|
||||
if (zcname := data.mdns_names.get(self.soco.uid)) and callback_timestamp:
|
||||
# Called by a _seen_timer timeout, check mDNS one more time
|
||||
# This should not be checked in an "active" unseen scenario
|
||||
aiozeroconf = await zeroconf.async_get_async_instance(self.hass)
|
||||
|
Loading…
x
Reference in New Issue
Block a user