Rule Engine Question

I’ve created a virtual switch that I want to turn ON if any door is open, and turn OFF if all doors are closed.

The ON part is easy because the dialog states the triggers are OR’d.

How would I implement the OFF part? There must be a way to AND conditions. Right?

See screenshots below. You can add each door’s both open and close event as trigger, so this rule will be kicked off when any of the door status changes. In the example below, I had two doors but you can add as many as you want.

Then in the flow, add first IF_Condition - when all doors’ status are ‘closed’, then set the switch to Off; otherwise, add the second IF_Condition - when any door’s status is open, then set the switch to On.

Since IF_Conditions can be nested and can be quite flexible in the case like this. Let me know if this helps.:slightly_smiling_face:

2 Likes

Thanks, James. Works perfectly! (I’m sure you’re not surprised at that…)

2 Likes