mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 06:37:52 +00:00
Improve sonos alarms typing (#137078)
This commit is contained in:
parent
37daa57818
commit
da7ba85ee6
@ -66,7 +66,10 @@ class SonosAlarms(SonosHouseholdCoordinator):
|
|||||||
event_id = event.variables["alarm_list_version"].split(":")[-1]
|
event_id = event.variables["alarm_list_version"].split(":")[-1]
|
||||||
event_id = int(event_id)
|
event_id = int(event_id)
|
||||||
async with self.cache_update_lock:
|
async with self.cache_update_lock:
|
||||||
if event_id <= self.last_processed_event_id:
|
if (
|
||||||
|
self.last_processed_event_id
|
||||||
|
and event_id <= self.last_processed_event_id
|
||||||
|
):
|
||||||
# Skip updates if this event_id has already been seen
|
# Skip updates if this event_id has already been seen
|
||||||
return
|
return
|
||||||
speaker.event_stats.process(event)
|
speaker.event_stats.process(event)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user