Help with basic rules and a virtual switch

I’m a new Rule Engine user and am having trouble with simple rules and the logic behind them. I’m trying to transition from WebCore and I just can’t seem to grasp the basic construction of a rule.

I have three physical switches and a virtual switch. I would like to create a rule which turns the virtual switch on when any of the three switches turn on, and then turn it off only when all three switches are off.

I’ve looked at many rule examples and just can’t seem to get this pulled together. Love SharpTools and could use some help! Thanks so much!

Here’s basically what you need. Granted you will need to change the devices out for your devices.

The triggers are if any of these things happen do the action.

Set VR switch on.

Set VR switch to off. In this case any time one of the 3 switches are turned off it checks to see if all 3 are off the turns off the VR switch.

1 Like

Thank you for your help! I realize now that this requires two rules and not one. I have a bit more learning to do! Thank again! Nick

In theory you could combine things into a single rule. Sometimes it’s just easier to split things out to multiple rules so its easier to edit the individual rules without a bunch of nested logic and conditions. :slight_smile:

2 Likes

I started to do that very thing, but since there seemed to be a bit of confusion on how the exact logic of a rule worked I decided to adhere to the K.I.S.S. principal.

1 Like

Thanks Josh. I’ll keep it simple like Jake suggests!

1 Like