Novice question - Mode state variable

Beginner question here.... I trying to test the current mode in a rule. I dont necessarly want to be trigger by a mode change, but rather want the know the current mode for whatever reason.

One way would be to set a variable based on the mode trigger... but since mode is already a state, I was wondering if we could read/test it directly.

Thanks

J.

Yeah...you can do it with a condition, assuming you are referring to rule machine:

image

Thanks. I have to rethink the way I think. I wanted to put it as part of the trigger as a condition.

J

You can do that as well. You can set the trigger to a specific mode and then define your actions when that mode is set:
image

Or, you could set the trigger to "mode changed" and then evaluate the mode value like I showed above.

image

You can also setup a required expression which limits when the triggers will be fired, e.g. a required expression on Mode = "Asleep" means the triggers will only take effect if triggered while in that mode, otherwise nothing will happen.

Hum. This is more or less what I wanted to do. Like :

When Time is 22:15 and not mode = away(F).

Or something like that

Is it what you mean ? If so I don’t seem to be able to find out how to get an expression in the trigger with the mode.

J

Perhaps we should put the various options in HE to one side for the moment... If you could describe what you are wanting to achieve with the rule, ignoring the constructs of triggers and conditions and expressions, etc. That may help in determining what options suit best.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.