mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Add guard to prevent exception in Sonos Favorites (#148854)
This commit is contained in:
parent
57e4270b7b
commit
549069e22c
@ -72,7 +72,7 @@ class SonosFavorites(SonosHouseholdCoordinator):
|
||||
"""Process the event payload in an async lock and update entities."""
|
||||
event_id = event.variables["favorites_update_id"]
|
||||
container_ids = event.variables["container_update_i_ds"]
|
||||
if not (match := re.search(r"FV:2,(\d+)", container_ids)):
|
||||
if not container_ids or not (match := re.search(r"FV:2,(\d+)", container_ids)):
|
||||
return
|
||||
|
||||
container_id = int(match.group(1))
|
||||
|
Loading…
x
Reference in New Issue
Block a user