mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 14:57:09 +00:00
Fix vanished checks on old Sonos firmware (#65477)
This commit is contained in:
parent
d195e8a1b4
commit
8d33964e4d
@ -701,7 +701,7 @@ class SonosSpeaker:
|
|||||||
"""Handle callback for topology change event."""
|
"""Handle callback for topology change event."""
|
||||||
if xml := event.variables.get("zone_group_state"):
|
if xml := event.variables.get("zone_group_state"):
|
||||||
zgs = ET.fromstring(xml)
|
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":
|
if (reason := vanished_device.get("Reason")) != "sleeping":
|
||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
"Ignoring %s marked %s as vanished with reason: %s",
|
"Ignoring %s marked %s as vanished with reason: %s",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user