1
0
mirror of https://github.com/elisspace/core.git synced 2026-09-01 17:04:05 +00:00

Handle incomplete Sonos alarm event payloads (#51353)

This commit is contained in:
jjlawren
2021-06-01 15:28:56 -05:00
committed by Paulus Schoutsen
parent f93acfc4c0
commit fc24b34408

View File

@@ -372,7 +372,8 @@ class SonosSpeaker:
@callback
def async_dispatch_alarms(self, event: SonosEvent) -> None:
"""Create a task to update alarms from an event."""
update_id = event.variables["alarm_list_version"]
if not (update_id := event.variables.get("alarm_list_version")):
return
if update_id in self.processed_alarm_events:
return
self.processed_alarm_events.append(update_id)