mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix invalid sources in media player sources list (#102646)
This commit is contained in:
parent
b37e9bc79a
commit
4bf475185e
@ -126,7 +126,8 @@ class AFSAPIDevice(MediaPlayerEntity):
|
|||||||
|
|
||||||
if not self._attr_source_list:
|
if not self._attr_source_list:
|
||||||
self.__modes_by_label = {
|
self.__modes_by_label = {
|
||||||
mode.label: mode.key for mode in await afsapi.get_modes()
|
(mode.label if mode.label else mode.id): mode.key
|
||||||
|
for mode in await afsapi.get_modes()
|
||||||
}
|
}
|
||||||
self._attr_source_list = list(self.__modes_by_label)
|
self._attr_source_list = list(self.__modes_by_label)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user