Conditions

I have some rules written controlling a thermostat that already have a condition ie: is the security panel is disarmed then the rule can run if armed then it stops there and want to add a second higher level condition that if the T-State mode is Off then do not allow the rule to continue .

So guess the question is can there be multiple conditions and how do you move or identify a condition has priority ahead of another. My thought is if the T-Stat Mode is Off then nothing else matters. If its on Cool then the Triggers and Actions will dictate what happens

Thanks

So a required expression is slightly different to a typical condition. A Required Expression stops the rule from even looking for any of the triggers, so it won't fire unless the Required Expression is true and then one of the trigger events occurs.

Other conditions can then be placed in amongst the actions, though I am not 109% sure of the options in the simpler rules apps.

2 Likes

You could do either, adding the .ode to the required expression or as an if condition, I expect

You can easily do this with conditions but not so easily with required expressions... the priority of conditionals is determined by the order they appear in the rule and the conditionals themselves. How you lay it out depends a bit on how may modes the tstat has... but you could do something like this:

IF Living Room T-Stat mode is cool then...
yada yada
ELSEIF Living Room T-Stat mode is heat then
yada yada
ENDIF

In this case OFF would result in no actions at all. Likewise you could just start with a simple conditional

IF Living Room T-Stat mode is off exit rule

and then add whatever actions you wanted

Looking at your example again though could you just change your required expression to

Relay 1 disarmed AND Living Room T-Stat mode is cool?

2 Likes

There should be an option for NOT...

Yes, there is... I just got lazy with my example!

1 Like

So tried just changing the expressions where if the mode is (Not) cool as that seemed the easiest but it did not work as planed. Not sure if I did not follow the suggestion or more needs to be done?

If you're trying to add it as a required expression, you need to edit the required expressions to add the condition you created.