Add event statistics to Sonos diagnostics (#64845)
This commit is contained in:
parent
5d7d652237
commit
ec88897d04
7 changed files with 138 additions and 47 deletions
|
@ -192,6 +192,8 @@ class SonosDiscoveryManager:
|
|||
return None
|
||||
|
||||
async def _async_stop_event_listener(self, event: Event | None = None) -> None:
|
||||
for speaker in self.data.discovered.values():
|
||||
speaker.event_stats.log_report()
|
||||
await asyncio.gather(
|
||||
*(speaker.async_offline() for speaker in self.data.discovered.values())
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue