Fix invalid sources in media player sources list (#102646)

This commit is contained in:
buzz-tee
2023-10-25 07:12:55 +02:00
committed by GitHub
parent b37e9bc79a
commit 4bf475185e

View File

@@ -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)