Change from OR to AND in rule

Trying to make a rule that turns on an air purifier when either pm2.5 or VOC go above a certain level,, but I don’t want the air purifier to turn off until both pm2.5 and VOC are below a set level.

This is the rule :

How do I change OR to AND in the ‘Wait for events’ section?

You can't trigger with a AND statement for the only good reason that it's impossible because it is EVENT driven and events will happen on changes and almost impossibly exactly at the same time, meaning your rule would never trigger).

Keep the OR in the trigger, then in the Actions, you do a...

IF LR AQM reports sensirionVOCindex>100
AND LR AQM reports pm25>50 THEN
"do these actions"
END IF

Hope this helps.

1 Like

Programming is not second nature to me. Thanks for the correction.

If I deleted the conditions, there would be an error in the actions

1 Like