Skip to content

Commit 8e0a89d

Browse files
PeteRagerfrenck
authored andcommitted
Add guard to prevent exception in Sonos Favorites (home-assistant#148854)
1 parent 9e4b8df commit 8e0a89d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

homeassistant/components/sonos/favorites.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ async def async_process_event(
7272
"""Process the event payload in an async lock and update entities."""
7373
event_id = event.variables["favorites_update_id"]
7474
container_ids = event.variables["container_update_i_ds"]
75-
if not (match := re.search(r"FV:2,(\d+)", container_ids)):
75+
if not container_ids or not (match := re.search(r"FV:2,(\d+)", container_ids)):
7676
return
7777

7878
container_id = int(match.groups()[0])

0 commit comments

Comments
 (0)