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: Order favorites by displayOrder #19

Merged
merged 2 commits into from
Jan 2, 2024

Conversation

kmstumpff
Copy link
Contributor

When turning on my Rest 2nd Gen (using ha_hatch), a random favorite would start playing. It seems like the ha_hatch code is picking the first favorite in the list returned by the api. However, this list doesn't seem to be in any particular order and can change.

This PR sorts the favorites list based on the displayOrder field so the favorites list is always ordered in a sensible way. This also makes sure ha_hatch picks the first favorite when turning on the media player.

@dahlb dahlb self-requested a review January 2, 2024 11:04
@dahlb dahlb added the bug Something isn't working label Jan 2, 2024
@dahlb dahlb merged commit df52ec3 into dahlb:main Jan 2, 2024
2 checks passed
@dahlb
Copy link
Owner

dahlb commented Jan 2, 2024

Thanks for this addition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants