mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Fix vanished checks on old Sonos firmware (#65477)
This commit is contained in:
parent
69a004a2f6
commit
770707f487
@ -701,7 +701,7 @@ class SonosSpeaker:
|
||||
"""Handle callback for topology change event."""
|
||||
if xml := event.variables.get("zone_group_state"):
|
||||
zgs = ET.fromstring(xml)
|
||||
for vanished_device in zgs.find("VanishedDevices"):
|
||||
for vanished_device in zgs.find("VanishedDevices") or []:
|
||||
if (reason := vanished_device.get("Reason")) != "sleeping":
|
||||
_LOGGER.debug(
|
||||
"Ignoring %s marked %s as vanished with reason: %s",
|
||||
|
Loading…
x
Reference in New Issue
Block a user