mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Skip Sonos zeroconf availability check in non-timeout scenarios (#54425)
This commit is contained in:
parent
8264fd2eb6
commit
f4fb5f2f5a
@ -499,12 +499,17 @@ class SonosSpeaker:
|
||||
|
||||
self.async_write_entity_states()
|
||||
|
||||
async def async_unseen(self, now: datetime.datetime | None = None) -> None:
|
||||
async def async_unseen(
|
||||
self, callback_timestamp: datetime.datetime | None = None
|
||||
) -> None:
|
||||
"""Make this player unavailable when it was not seen recently."""
|
||||
if self._seen_timer:
|
||||
self._seen_timer()
|
||||
self._seen_timer = None
|
||||
|
||||
if callback_timestamp:
|
||||
# Called by a _seen_timer timeout, check mDNS one more time
|
||||
# This should not be checked in an "active" unseen scenario
|
||||
hostname = uid_to_short_hostname(self.soco.uid)
|
||||
zcname = f"{hostname}.{MDNS_SERVICE}"
|
||||
aiozeroconf = await zeroconf.async_get_async_instance(self.hass)
|
||||
|
Loading…
x
Reference in New Issue
Block a user