diff --git a/homeassistant/components/philips_js/media_player.py b/homeassistant/components/philips_js/media_player.py index 451e8d6a3c2..7ccec14406a 100644 --- a/homeassistant/components/philips_js/media_player.py +++ b/homeassistant/components/philips_js/media_player.py @@ -313,10 +313,11 @@ class PhilipsTVMediaPlayer(MediaPlayerEntity): self._tv.update() self._sources = { - srcid: source["name"] or f"Source {srcid}" + srcid: source.get("name") or f"Source {srcid}" for srcid, source in (self._tv.sources or {}).items() } self._channels = { - chid: channel["name"] for chid, channel in (self._tv.channels or {}).items() + chid: channel.get("name") or f"Channel {chid}" + for chid, channel in (self._tv.channels or {}).items() }