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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,7 +126,8 @@ class AFSAPIDevice(MediaPlayerEntity):
if not self._attr_source_list:
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)