Sort Apple TV app list by name (#65386)

This commit is contained in:
Pierre Ståhl
2022-02-01 22:30:28 +01:00
committed by Franck Nijhof
parent fcd14e2830
commit 91023cf132

View File

@@ -162,7 +162,10 @@ class AppleTvMediaPlayer(AppleTVEntity, MediaPlayerEntity):
except exceptions.ProtocolError:
_LOGGER.exception("Failed to update app list")
else:
self._app_list = {app.name: app.identifier for app in apps}
self._app_list = {
app.name: app.identifier
for app in sorted(apps, key=lambda app: app.name.lower())
}
self.async_write_ha_state()
@callback