Cannot see how to create a RM4 trigger for a value "becomes" < 400

Latest Hub Version installed.

I want to make a simple Lux trigger for my accent lights. I had thought there was a "becomes" option but I can't find it.

Not the below RM creation screen show "illumination becomes" 400 however the Rule text up top does not have any becomes qualifier and the operation of the rule (previously created) acts like it will trigger each time the Multisensor 6 reports Lux.

I guess I could use a local but isn't there a better way?

John

This is really the only type of trigger you can create that resembles what you want. I can't remember if the displayed wording of this changed recently, but with triggers like "becomes < 400," what really happens regardless of wording ("is < 400," "reports < 400," etc.) is that the trigger matches every time a new event gets generated where the reading is less than 400, even if the device previously reported a value in that range (i.e., it doesn't track it and only "reset" when it goes outside of that range).

However, as you suggest, there is something you can do. If you're not using it for anything else, Private Boolean is one way that would work (if you are using it or don't want to, you could also use a local Boolean variable instead, but PB is already there for you). An easy way is just to set it to False for this rule, making the first part of your actions something like:

IF (Private Boolean False) Exit Rule
Set Private Boolean False
// My real actions here

Then, you could create another rule triggered on PB > 400 or whatever range you want and set the PB on this rule to True (that's one advantage of PB over a local variable: it's accessible from other rules).

Alternatively, you could add something like this to the end of the rule and keep it all in one:

// My real actions end here
Wait for events: Illuminance of Multisensor_6 > 400
Set Private Boolean True

...but then you'd need a few more clicks, something like this for the actions (otherwise that part will never run...maybe I should have just done this from the start instead of trying to save a few clicks, but at least you can see my thought process):

IF (Private Boolean is True) THEN
  Set Private Boolean False
  // My real actions here
END-IF
Wait for events: Illuminance of Multisensor_6 > 400
Set Private Boolean True

...and there might be other ways, depending on what makes sense to do in your exact case.

Or to answer your last question directly, no, I don't think there is a better way with RM. :slight_smile:

1 Like

Thank you. I thought I was going senile. I could have sworn I'd seen becomes in a number of posts :slight_smile:

“becomes” was recently changed to “reports”. Suppose the lux is 500, and then becomes 380. The rule will trigger. Then the next lux event is 295. That will trigger it also. So, using the word “becomes” would be misleading. This has always been the way it actually works, but some users had thought it would only trigger the first time it changed from more than 400 to less than 400.

2 Likes

You might want to change the text in the trigger page(?). See above. While technically correct it can be confusing.

To what? It was just changed due to the confusion I described.

1 Like

I'm using 115 and took this screen shot 2 minutes ago. Are we talking about the same screen?

I would consider Illuminance becomes ---> Illuminance

What about the case where illuminance is 200 and then changes to 190. How is that “becomes < 400” when illuminance was already < 400? The rule will trigger upon the sensor reporting anything less than 400.

Ah, the second use of the word "becomes" needs to be fixed.

Sorry, my vision is not great recently due to some eye surgery... I didn't see what you were referring to.

Don't feel bad, I didn't even notice the one you changed, my focus was on the one below :slight_smile:

I hope you eyes heal well :slight_smile: :slight_smile:

John