From 1325682d828c148cc00c7a032fb1c6a1b1c12fea Mon Sep 17 00:00:00 2001 From: Anders Melchiorsen <amelchio@nogoto.net> Date: Mon, 23 Jul 2018 12:29:37 +0200 Subject: [PATCH] Use case insensitive comparison for Sonos model check (#15604) --- homeassistant/components/media_player/sonos.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/media_player/sonos.py b/homeassistant/components/media_player/sonos.py index da0ad24b135..8a92d89ce67 100644 --- a/homeassistant/components/media_player/sonos.py +++ b/homeassistant/components/media_player/sonos.py @@ -865,9 +865,10 @@ class SonosDevice(MediaPlayerDevice): """List of available input sources.""" sources = [fav.title for fav in self._favorites] - if 'PLAY:5' in self._model or 'CONNECT' in self._model: + model = self._model.upper() + if 'PLAY:5' in model or 'CONNECT' in model: sources += [SOURCE_LINEIN] - elif 'PLAYBAR' in self._model: + elif 'PLAYBAR' in model: sources += [SOURCE_LINEIN, SOURCE_TV] return sources -- GitLab