RM trigger operator meanings

I'm writing new rule in RM 5.1.1 and I don't have a clear understanding of how the operators function.

What I think:

  • The code "Variable time: NormalOffTime" means when the variable becomes equal to the time of hub variable NormalOffTime. Since the NormalOffTime does not change this is the equivlanet to "then Time becomes equal to NormalOffTime"

What I am unsure of:

  • The code "Illuminance of Mijia Lux Sensor reports < AccentOnLux"
    does this mean:
  1. When the Lux sensor reports becoming < AccentOnLux
    OR
  2. Each time the Lux sensor reports a value that is < AccentOnLux

I thought there was a becomes option for the trigger but I may have been thinking of another operation.

So far as I know, correct on Part A.

As for Part B, once something becomes TRUE, it cannot become "more true" or "true again", so your first guess simply has to be the correct one? (Turns out I'm wrong: See "Solution" below.)

I think what you're seeing used to be phrased "becomes" but was changed to "reports" because it does (and always did) trigger on each such matching event, not just the first. So your explanation #2 is correct. Your description of the other trigger is also correct.

As an interesting side note, in Rule 5.x, one use for the "required expression" feature is to capture a specific state transition. So if you only want to trigger on the first lux < 5 reading, make a required expression of lux >= 5 (with a trigger of lux < 5), and then you'll have exactly that (until it goes above and can again re-trigger). If you have multiple triggers (as you do) nd what different things with each (not sure if you do), this may not work, but it works well for simple triggers.

Triggers are events, just moments in time, and as such, they do not have truth values. (Not to be confused with conditions or expressions, which do.) So, it's actually the second guess that is correct. :slight_smile:

3 Likes