-
-
Notifications
You must be signed in to change notification settings - Fork 79
Feature request: allow mapping buttons to existing HA services/automations #6
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
Comments
Would you prefer the ability to override specific buttons with specific commands and different entities, or would it be ok to simply override any button with a HA script? If I made every button able to be overridden by a named script, it could handle all of your requests at once. |
first. very kind of you to offer and work on this at all. I'm not quite sure how to answer. I only have specific needs, but others may have different needs. so if it's easier to override any button with a script, then i think that would work. I found this script on the forum. so if that does indeed work, then i would be fine with that. I could create the 3 or 4 scripts I need and be happy. |
Thanks for the quick reply! I'm happy to give back to the open source community that has given me so much over the years! I'll never be able to repay the countless volunteers, but I want to give back by offering my best efforts in the hopes that it helps others. Your questions, requests, and fast feedback are a great contribution too! So again, THANK YOU! I'm trying to work out in my mind what is the most user friendly/HA noob friendly way to tackle button function customization. Since each user will likely have different desires, it's not realistic to that I can build one simple config UI to handle everything. I think YAML will have to be required to add or change the normal functions, which is fair. In my mind, I think that the most simple way for a new or average user would be to first build and test a script using the Home Assistant script building UI. Once the script is ready then type a small bit of YAML to attach it to a button the Firemote card. Essentially, I was thinking that with YAML I could allow something like this: volume_up:
script: your_script_name_here
power:
script: your_other_script_name_here Just because it seems like the easiest route for a user in my mind, doesn't mean that every user would agree. I'm glad you're cool with it! If you (or anyone else reading this) have an idea for a different approach that might make this sort of customization easier for a new Home Assistant user, I'd love to hear it! Easy and stable is the main goal, all without sacrificing flexibility. |
Just to add an opinion here: My guess is that most buttons could be handled by a single service call. Something like this example (although the If I'm right about that, I think it would be simplest to keep most button commands in a single yaml file, but it would be great if scripts were supported as well. Something like this maybe? Or does that complicate your side of things too much?
Basically this just avoids the need to create separate scripts for each button. |
Best of both worlds? Thanks for the input @toddsay. |
Hi - just wanted to add my vote to allowing an override for volume commands through script or whatever is easiest to integrate. I like that the remote is exactly as the physical version. Only other enhancement would be to add buttons based on apps that are not standard. But not as important as volume. Thank you for this remote, it looks fantastic and works as expected. |
Here is another vote for this feature 👍 |
@clinds34 - Currently, Firemote supports more than the 4 apps that come pre-programmed into the physical remote controls. Here is the current list:
If there is a specific (non-sideloaded) app or apps you would like added to this list, just let me know and I'll make it happen for you. |
Hi - it is the Bell Fibe TV app and the Crave tv app. Thank you! |
Added Part 1 of Button Overrides Request: #6 - You can now override any button with a Home Assistant Script (see documentation) - YAML based scripts will be coming in part 2 Added app shortcuts: - Bell Fibe TV (Canada) @clinds34 #6 - BBC iPlayer (UK) - (needs community sign-off ) @Scoff123 #5 Fixed button press animation scale issue when Firemote was not set at 100% scale Began Device Type exhaustive list setup Added support for Fire TV Toshiba V35 Fixed Power On / Power off issue for Fire Stick 4K 1st gen 2018
Release v1.8.0 is now available! Button Overrides are now possible through Home Assistant scripts. Take a look at the ReadMe file for usage instructions YAML based script commands will be available in a future release. For now, this issue will be marked as closed. @clinds34 - This release includes an app shortcut for Bell Fibe TV, but I was unable to complete your request for the Crave TV app shortcut. Please take a look at issue #13 to see if you can assist further. |
Confirming that this works beautifully for me, and I now have the volume buttons controlling my Sonos sound bar, and the power button toggling the TV on and off. BBC iPlayer also works. It took me a little while to figure out how to clear the very sticky frontend cache; for a long time, I thought it wasn't working, but it turned out to be just the cache. Thanks a lot for this @PRProd! |
Just commenting here to check in on using service calls for button overrides. I don’t want to make scripts for volume up, volume down, mute and power if this new version is coming soon. |
@broyuken - I've been taking some time off of this project during the holiday season, but I plan on resuming work fairly soon. My apologies for the delay. |
What's new: As discussed long ago in #6, the option to call Home Assistant services directly through the YAML config has finally arrived! Details can be found here: https://github.com/PRProd/HA-Firemote#button-overrides Special thanks to @ghvader, @toddsay, @clinds34, @michaelhenningersrb, @craigrouse, and @broyuken for this additional override request, and their patience with me to finally get it done. NVIDIA Shield style 1 remote now includes the secret volume control buttons in the "spine" area between the "wings" on the bottom of the remote. Click around and you might find them.
I'M SOOOO SORRY for not getting the second part of this done months ago! To be honest, I might have forgotten about it. 😉 With the release of version 2.0.3 you are now able to directly override Firemote buttons using your YAML config without the need to write an additional script. Here is an example of how to make that work: button_overrides:
volume-up-button:
service: light.toggle
target:
entity_id: light.bedroom_lamp
data:
color_name: red
transition: 2
brightness_pct: 100 I'm not sure why anybody would want to turn the bedroom lamp on and off while also making it red and bright, but there you go. Let me know what you think! ...or maybe yell at me for taking so long?? 😄 Enjoy! |
Thanks for this! And for the example of how to enable "red light district" mode. 😆 You gave us the "best of both worlds" solution. This gives us lots of flexibility. 👍 It's working well for me, mapping the volume up/down/mute buttons to my receiver. The only oddities relate to how the |
@toddsay - It's possible that I handled something incorrectly on my end. One thing that could be useful for me to look at is if you could show me a Firemote YAML config section side by side with a YAML script, and explain precisely their difference in behavior. (if any) I modeled my Firemote YAML config format to match how a script looks, but I didn't have a lot of examples to test with... maybe I got distracted by the red light? 😆 Either way, if you can make it work how you need it to work in a HA script, then likely it can be done in Firemote too. |
Thanks, I don't think there are any issues with your work (or none that I'm aware of). I only mentioned the media_player oddities because others might try similar settings. I'll let you know if I find issues but I think it's just normal behavior. |
Not working for me outside of a Script. DOWN does not work when in-line; DOWN as a script, same service call, works fine.
Any suggestions? |
@Jeppedy - Give this a try: button_overrides:
volume-down-button:
service: webostv.button
target:
entity_id: media_player.lg_webos_tv_un8500auj
data:
button: VOLUMEDOWN |
You are waaay too kind, and I must have been working on it waay too late at night. SORRY to bother you... Of course that works... :-) |
No worries, @Jeppedy! I'm just glad that it's working for you now! |
Feature Request:
My amazon remote sends IR codes to my receiver(s) to change the volume/mute/power on.
My receiver(s) are also in HA and it controls the volume/power. it would be great to be able to map volume up/down/mute buttons to the HA services
media_player.volume.down
media_player.volume.up
media_player.volume.mute
would need to be able to input a specific entity as I have a receiver on each floor of the house
Feature Suggestion:
additionally the power button could be mapped to trigger an automation which could turn on tv's, receivers, on/off lights. etc
The text was updated successfully, but these errors were encountered: