Add guard to prevent exception in Sonos Favorites (#148854)

This commit is contained in:
Pete Sage 2025-07-16 02:09:24 -04:00 committed by GitHub
parent 57e4270b7b
commit 549069e22c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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))