Continuous triggering 2

I have a trigger that keeps triggering:
Illuminance of Lisa ZigBee Parent Illuminance Sensor1(1786) becomes >= 1001
The sensor is updating the driver every minute currently.
Even if the illuminance is always greater than 1001 the trigger keeps triggering.
The trigger fires every time the value is updated by the device.
Normally I would expect the code to only trigger the first time the values becomes true.
What the What?

That is what the trigger is designed to do. It will trigger whenever there is a measurement that is greater than or equal to 1001. The trigger should read "IS" and not "BECOMES" because it is not a threshold but state-wise. So, you need to work in some type of PB logic to prevent re-triggering.

Are you talking about a rule continually triggering when the value is above 1001 and you don't want it to?
Perhaps a little more info please and maybe screenshots if it is a rule would really help people on here to help you.

1 Like

FYI, I opened a whole thread on this a while ago:

Specifically, Bruce's explanation of how greater than/less than triggers work.

1 Like

Arghh!! Glad you guys are talking about this...

Turns out I have a rule on my control hub that checks for illuminance below a certain amount and sets a virtual switch. This switch is synced to my other hubs via HubConnect.

I wonder if I am inadvertently spamming my hubs..

This should work...

You could also maybe just use the Private Boolean instead of a local variable - not sure of the cost of each but PB is built in.

You will always have to trigger an event to test for the changes but (I think) depending upon how you set your conditions you can make it fairly low impact.

Had to make it a global to share between two rules.

This is what I was thinking... something like this:

That won't work at all because the variable is never going to be updated. The rule is only being triggered off the variable changing but the variable only changes if something within the rule happens. The conditions within the rule are only evaluated after the rule is triggered. This will definitely not work.

That will work correctly.

1 Like

This is how I do it. Been doing it this way for some time.

@erktrek method is a LOT simpler. You don't need all those Elses and exit rules. If you don't meet any of the IF or ELSE IF criteria, the rule will automatically exit. You don't have to do it by hand.

Also, i find all the logging with delays a little excessive. Maybe when you are working on something but once you have it worked out, i would remove them. In the end it just causes increased overhead with no added value.