I would like to factor my rule. Is it possible to transmit a value from sitemap to a rule ?
For example :
Switch test1 (groupA)
Switch test2 (groupA)
Switch test1 mappings=["var1"="ON"]
Switch test2 mappings=["var2"="ON"]
I would like to use var1 or var2 in a rule. Is it possible ?
When I click on test1 I would like to trigger rule “action” and I would like to use var1.
When I click on test2 I would like to trigger rule “action” and I would like to use var2.
It should be the same rule.
Perhaps you want to trigger from
If you want the text from the mappings you need to use a String Item and define the mappings as
And your Rule is a whole bunch of nonsense. There is no such thing as a Group trigger.
sendCommand takes two arguments, an Item and the command.
Over all this looks a whole lot like an XY Problem. What are you actually trying to achieve?
I have edited my post in order to explain a little more
My solution is still the same.
But why have two Items? Why not
Trigger the Rule with the one test Item and look at
test.state to see which “button” was pressed?