Switch with 2 SendCommand actions

It is covered in this one:

Somewhat touched upon in this one:

Never ever worry about making rules resource efficient until you after you know you have a performance problem. It will result in unnecessarily complex and hard to maintain code and a lot of unneeded effort on your part to code it. It is, IMHO, a complete waste of time.

(NOTE: I’m only talking about the context of Home Automation rules in openHAB. This general rule does not necessarily apply to all programming.)

I don’t know if I understand what you are trying to do because your example isn’t sending two commands at all. It is just sending the one command to VB3_1A. In which case, why not just use VB3_1A in the first place? I don’t see what value test_on_off actually provides.

However, if your example is contrived to the point that it doesn’t illustrate what you are really trying to do, then @Udo_Hartmann is on the right track with Groups. But you can use the Group directly:

For example, assuming all the Items to be commanded are of the same type (let’s use Switch since it is what your example uses) you can define the Group as:

Group:Switch:OR(ON,OFF) test_on_off_dimmer

If you put test_on_off_dimmer on your sitemap as a Switch or sendCommand to it from a Rule, all the members of that Group will receive the command. The state of the Group as I defined it above will be ON if one or more members of the Group are ON and OFF otherwise.