Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix app name sorting in apple_tv #109274

Merged
merged 2 commits into from
Feb 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions homeassistant/components/apple_tv/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,13 @@ async def _update_app_list(self) -> None:
except exceptions.ProtocolError:
_LOGGER.exception("Failed to update app list")
else:
self._app_list = {
app_name: app.identifier
for app in sorted(apps, key=lambda app: app_name.lower())
if (app_name := app.name) is not None
}
self._app_list = dict(
sorted(
(app_name, app.identifier)
for app in apps
if (app_name := app.name) is not None
bdraco marked this conversation as resolved.
Show resolved Hide resolved
)
)
self.async_write_ha_state()

@callback
Expand Down
Loading