Fix vanished checks on old Sonos firmware (#65477)
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…
Reference in New Issue