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

Add Player Controls feature #1925

Merged
merged 6 commits into from
Jan 31, 2025
Merged

Add Player Controls feature #1925

merged 6 commits into from
Jan 31, 2025

Conversation

marcelveldt
Copy link
Member

Introduce a "Player Controls" feature so the user can define how to handle power, mute and volume controls for players.

  • In the Player settings you can now define a "control" for Power, Mute and Volume.

    • The default control for each category is "native" if the player supports it natively.
    • If a player does not support a certain control (e.g. power), it will use "NONE" as control, so no control.
    • The UI will only show a power/mute/volume control if there is one assigned on a player.
    • The HA integration will also be informed by the control and enable features based on the enabled controls.
  • For power, we introduce a "fake" power control, so users can go back to the previous behavior if they want that every player can be turned on/off if they like that for sorting/consistency reasons.

  • The HA plugin provider has been adjusted so it can provide "controls" to MA.

    • For power controls, you can use entities that can be turned on/off and have a boolean state. Currently switch, and input_boolean but we also accept media_player.
    • For mute controls, you can use entities that can be turned on/off and have a boolean state. Currently switch, and input_boolean but we also accept media_player (where mute state will be mapped).
    • For volume controls, you can use entities that can have a numeric value/state. Currently input_number, and media_player (where volume_level will be mapped).

image

image

image

@marcelveldt marcelveldt merged commit 06cec6a into dev Jan 31, 2025
6 of 7 checks passed
@marcelveldt marcelveldt deleted the feat-player-controls branch January 31, 2025 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant