From c29a5dc3fd31964b1a8a9394af4f46b4657f208f Mon Sep 17 00:00:00 2001 From: jjlawren Date: Tue, 19 Apr 2022 01:56:03 -0500 Subject: [PATCH] Add guard for Sonos S1 radio show compatibility (#70251) --- homeassistant/components/sonos/media.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/sonos/media.py b/homeassistant/components/sonos/media.py index f4108b85317..1b4dbd00d59 100644 --- a/homeassistant/components/sonos/media.py +++ b/homeassistant/components/sonos/media.py @@ -172,7 +172,8 @@ class SonosMedia: if et_uri_md: self.channel = et_uri_md.title - if ct_md and ct_md.radio_show: + # Extra guards for S1 compatibility + if ct_md and hasattr(ct_md, "radio_show") and ct_md.radio_show: radio_show = ct_md.radio_show.split(",")[0] self.channel = " • ".join(filter(None, [self.channel, radio_show]))