3 parameters to an action

I’d like to open a tile with the possibility to type in 3 different parameters and then execute the action by passing these parameters. For example I want to start the clim by passing the temperature degree I want, like 72 degrees.

I think I could use 3 text boxes to enter parameters but how can I pass these values to the action ? Is it possible ?

1 Like

In case my question was not clear, here is the action button in Hubitat

image

How can I execute that action in Home remote since it requires 3 parameters ?

I don’t think the Maker API has a way to send 3 commands with 1 API request. What you can do is send 3 requests (Data Actions) on 1 button click. Take a look at the screenshot below. You could do something like that.

Thank you bill for your answer. Is it normal that I don’t have access to all commands defined in the Hubitat device ? I don’t see them in the actions list. Is there a way to activate these commands ?

I found my answer in the forum, what a great job bill. Your app is wonderful !

I asked on Hubitat forum and they said yes it is possible to send 3 parameters:

Yes, just separate the parameters with commas, something like:

<URL>/apps/api/<appID>/devices/<deviceID>/commandName/param1,param2,param3?access_token=<access_token>

I don’t know exactly how to do this THR but I will make some tests this weekend. If you have an idea…

In the DataAction I’m doing a Command to execute my generic command (ClimManual) but I tried many things to pass these 3 parameters but nothing works.

Last thing I tried in the Value did not work:
ClimManual ({Binding ElementName=WTemperature, Path=Text},{Binding ElementName=WFrontDefrost, Path=Text},{Binding ElementName=WRearDefrost, Path=Text})

When I tried your example with 3 DataAction before the command I got this error in Maker API:
Cannot invoke method getAt() on null object on line 465 (method sendDeviceCommandSecondary)

Have you checked the Hubitat logs to see what was actually sent to it? “sendDeviceCommandSecondary” is an error from Hubitat. That is not a Home Remote error. Likely the command isn’t formatted correctly. So we need to verify what was actually sent.

You are probably going to have to do something like this. Create 3 virtual device variables to store values from the combobox. Then pass those virtual device variables to the generic command like this.

Yes and the message I showed is the one from Hubitat log.

Not sure, I created 3 TextBox, is it what you call virtual variable ? Or it is in Hubitat ?

Here what I did but it says Command not found in THR.

I added a default value for all 3 parameters in hubitat driver and it works. So the problem with my call are the 3 parameters that are empty.

This does not work

BUT hardcoded values works fine

Is it possible that I cannot bind an ELEMENT in the MultiBinding ?

I “think” you can do an Element in the MultiBinding but it’s definitely not the way you have it shown. The GUI dialog only allows you to edit the Path. You’ll have to set the ElementName in the XAML view. Click the button in the bottom right corner of Window to switch from DESIGN to XAML view.

If it’s supported, this is what it would look like in the code-behind. Give it a try. If it doesn’t work, then you’ll probably have to create some virtual device variable in Home Remote as a buffer store. Bind them to the TextBox then reference those variables in the multibinding.

See what I get (why there is an empty bracket in front of the binding element ?)

I removed them and still not work.

I just created a variable but I have to understand how I can use it now. Is there some help somewhere with these variables ?

Thank you bill !

With the variable it works ! Yayyyyy !

But I’d like to know what is the use of Status variable and Mapping Variable in the definition of the variable;