Reduce repetitive noise in Sonos debug logs (#53352)

This commit is contained in:
jjlawren 2021-07-26 00:54:38 -05:00 committed by GitHub
parent c18b626d67
commit 550a6f159e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 7 deletions

View File

@ -42,12 +42,6 @@ class SonosDiscoveryFlowHandler(DiscoveryFlowHandler):
boot_seqnum = properties.get("bootseq")
model = properties.get("model")
uid = hostname_to_uid(hostname)
_LOGGER.debug(
"Calling async_discovered_player for %s with uid=%s and boot_seqnum=%s",
host,
uid,
boot_seqnum,
)
if discovery_manager := self.hass.data.get(DATA_SONOS_DISCOVERY_MANAGER):
discovery_manager.async_discovered_player(
"Zeroconf", properties, host, uid, boot_seqnum, model

View File

@ -460,7 +460,6 @@ class SonosSpeaker:
self.soco = soco
was_available = self.available
_LOGGER.debug("Async seen: %s, was_available: %s", self.soco, was_available)
if self._seen_timer:
self._seen_timer()
@ -473,6 +472,12 @@ class SonosSpeaker:
self.async_write_entity_states()
return
_LOGGER.debug(
"%s [%s] was not available, setting up",
self.zone_name,
self.soco.ip_address,
)
self._poll_timer = self.hass.helpers.event.async_track_time_interval(
partial(
async_dispatcher_send,