Regarding FAQ and Calling Scripts #470
Replies: 3 comments 5 replies
-
Greetings @ronfarbernewman! Looking at your profile, we're practically neighbors in real life! That's pretty neat!
Thanks! It's a passion project of mine, and I'm always encouraged when I hear kind words like yours, and notification I automated in HA that plays every time I get a new GitHub star. ⭐
I completely understand what you are saying, thank you for pointing it out! This repeated question was commonly phrased as written, so that's why I put it in the FAQ that way. The actual intent of the question was asking if it was possible to write a Home Assistant script that called the Firemote card to do something. I think it's time for me to re-write that question to make it clearer. Thanks. Regarding the topic of calling scripts and passing values, great minds think alike! User @manonstreet brought this topic up in issue #293, so it's definitely on my list. I love that you were able to make it work the way that you did! Maybe that should be the solution for #293, or at least a temporary one? It's a great discussion topic for sure. Speaking of discussions, since you titled this as "Discussion" but opened it as an issue instead of a discussion, I'm going to convert it to a discussion now. After that, I'll work on updating the FAQ so it makes more sense, and then hopefully @manonstreet and others will join us in a fun debate about the best way to handle passing values. Thanks for reaching out! I hope to hear from you soon! -Doug |
Beta Was this translation helpful? Give feedback.
-
Does this FAQ update sound better/clearer? |
Beta Was this translation helpful? Give feedback.
-
I'm going to close this discussion for now. Let's continue over at #293 |
Beta Was this translation helpful? Give feedback.
-
Hey there! Love this project, so thank you for your hard work!
I was just reading the FAQ looking for something else when I stubbled upon this question and answer:
I actually didn't come across this during my initial setup of my Firemotes a few weeks ago, which is good, because I definitely used scripts on a few of my buttons, haha. But I also recall seeing "script" support in the examples within the README. Is this "no scripts" note in the FAQ a legacy limitation? If so should it be removed?
While on the topic of calling scripts, I will say the suggested way of linking a button to a script with the
script:
parameter of an individual button definition is a little limiting. I found myself wanting to pass a variable into my script as to use the same script for a few different buttons (selecting different inputs on mymedia_player
entity), but could not for the life of me figure out how to pass data in. I ended up doing it by linking my button to a service – thescript.turn_on
service, like below:By calling scripts with the script.turn_on service, you're able to pass in data under variables and have them available in the scripts.
Is there an easier way to do this by passing in a script under
scripts:
or is this perhaps a better way for all scripts to be called? I'd be happy to suggest edits to the docs if so!Thanks again for your work on this!
Beta Was this translation helpful? Give feedback.
All reactions