Multiple parameters
-
Commands can take a parameter and there are examples of how to invoke in alexa and how to process in the command.
But can we supply multiple parameters? A recent example command cmd file had several %n parameters which made me think you can.
I previously tried guessing the correct incantation but didn't get it to work.
thanks
-
@Steve-Lee, yes, you can pass multiple parameters, but not with the TRIGGERcmd Smart Home Alexa skill. That will only pass on, off, a number, or a color as the parameter.
There are other ways to run your commands though, like the original TRIGGERcmd Alexa skill, or the simplest way is to use this Parameters button for the command on the website:
You can enter any number of parameters there:
-
@Russ thanks for the confirmation.
"Ask TC to run Thing with parameter foo"
But what do I say for multiple parameters. I tried things like:
"Ask TC to run solo with parameters two and on"
Steve
-
@Steve-Lee, sortof correct. You could say:
Ask TC to run Thing with parameter kung foo"
Then you'll see an entry like this in the Thing command's runs list:
Trigger sent from Alexa params = kung foo
In other words, your command would run with 2 parameters:
- kung
- foo
More examples:
-
@Russ it was another of those pesky Ss then lol. Didn't think of that. Thanks
-
@Russ said in Multiple parameters:
but not with the TRIGGERcmd Smart Home Alexa skill. That will only pass on, off, a number, or a color as the parameter
Exploring Home Skill parameters a bit with notepad i find
- doesn't work with a colour, just get error "having trouble accessing your skill". Is the skill not set for colours?. In the alexa docs I see lots of optional default intents for home (eg on and off for power) - perhaps they could be configurable in the command settings?
- percent just passes the number with no indication it is a percentage. I assume that's Alexa be a bit rubbish
- "negative" or "minus" prefix don't work - is there a way
Any thoughts?
-
@Steve-Lee said in Multiple parameters:
doesn't work with a colour, just get error
but "alexa turn notepad green" gets notepad to open green.txt