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

Support turn_on/off_action #2

Closed
TheGroundZero opened this issue Oct 26, 2020 · 3 comments
Closed

Support turn_on/off_action #2

TheGroundZero opened this issue Oct 26, 2020 · 3 comments

Comments

@TheGroundZero
Copy link

TheGroundZero commented Oct 26, 2020

Hi

I noticed that while media_player.pause works to stop playing music from the Radio source on my HiFiBerry, media_player.start doesn't restart the stream.
Therefore, I want to use media_player.volume_mute (true/false) instead via the turn_on_action and turn_off_action most mediaplayers usually support.

However, it seems that this integration doesn't support these options.
Invalid config for [media_player.hifiberry]: [turn_on_action] is an invalid option for [media_player.hifiberry]. Check: media_player.hifiberry->turn_on_action. (See ?, line ?).

Would you (or someone else) be willing to add support for these options to this integration?

Kr
TGZ

@willholdoway
Copy link
Owner

Hi TGZ, why would you want to do this rather than just use mute/unmute? Given it's not an additional feature and is just a remap I would suggest maybe you do this by means of a universal media player?

@TheGroundZero
Copy link
Author

TheGroundZero commented Oct 26, 2020

Hi @willholdoway

It's easier if the entity can be configured using turn_on_action and turn_off_action instead of having to manually set tap_action etc to call the service.

Currently, stopping and restarting the played media (at least the radio stream) doesn't work as I'd expect to.
If I click the entity (status-icon in picture-elements card) I can stop the stream, but not restart it.
That's not how one would expect to control a mediaplayer from the HA dashboard.

So one would either expect to either "fix" it using turn_on_action and turn_off_action or the integration being able to do so.

@willholdoway
Copy link
Owner

Hi @TheGroundZero I don't understand your Lovelace setup with this unfortunately. Mute and unmute is not starting and stopping a media stream so I'm not happy to integrate a non-feature like that. As I mentioned before, remapping a function like this can be very easily achieved with a universal media player

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