Add a timeout during Sonos speaker setup (#71973)

This commit is contained in:
jjlawren 2022-05-16 18:03:39 -05:00 committed by GitHub
parent 8fcee01db0
commit e339f43322
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,7 +204,7 @@ class SonosDiscoveryManager:
def _add_speaker(self, soco: SoCo) -> None:
"""Create and set up a new SonosSpeaker instance."""
try:
speaker_info = soco.get_speaker_info(True)
speaker_info = soco.get_speaker_info(True, timeout=7)
if soco.uid not in self.data.boot_counts:
self.data.boot_counts[soco.uid] = soco.boot_seqnum
_LOGGER.debug("Adding new speaker: %s", speaker_info)