mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 20:55:10 +02:00
Fix invalid sources in media player sources list (#102646)
This commit is contained in:
@@ -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)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user