Fix referenced before assignment error in sonos speaker (#57924)
This commit is contained in:
parent
9a58bfdf41
commit
d20936d175
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue