mirror of
https://github.com/home-assistant/core.git
synced 2025-08-07 22:55:10 +02:00
Fix philips_js channel and source name entry (#44296)
This commit is contained in:
@@ -313,10 +313,11 @@ class PhilipsTVMediaPlayer(MediaPlayerEntity):
|
|||||||
self._tv.update()
|
self._tv.update()
|
||||||
|
|
||||||
self._sources = {
|
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()
|
for srcid, source in (self._tv.sources or {}).items()
|
||||||
}
|
}
|
||||||
|
|
||||||
self._channels = {
|
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()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user