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

Media player documentation is incorrectly stating MediaPlayerState's as uppercase #2131

Open
ss89 opened this issue Apr 1, 2024 · 2 comments

Comments

@ss89
Copy link

ss89 commented Apr 1, 2024

The states of a media player are documented here as uppercase: https://developers.home-assistant.io/docs/core/entity/media-player/#states

However i just discovered in the developer tools of home assistant (2024.3.3) that in fact these values should be lower case (at least with my media player).

See: https://github.com/home-assistant/core/blob/429b5d22cf92a3f1c615ac6593ed2a309b086477/homeassistant/components/media_player/const.py#L46

Code snippet {{states('media_player.kuche')}} results in paused not PAUSED, as PAUSED is just the key of the enums field, not the value.

One could also argue that the table should contain: key, value and description instead of just value (incorrect, as is key/field) and description.

It might be obvious for people that to development on home assistants core, but it is not obvious for people that start with creating automations - or am i reading the wrong page of documentation?

@joostlek
Copy link
Member

joostlek commented Apr 1, 2024

The page you are referring to is how it's displayed in the code, so the page is correct.

If there was more documentation about it, I'd expect it in the normal documentation, but I can't find it, maybe we need to improve there.

@ss89
Copy link
Author

ss89 commented Apr 1, 2024

Thanks, i created the issue for the integrations page instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants