Rule to only run once per time frame

Hi, I have this rule which is working fine. So when the door opens, the light turns on. However I don't want the rule to run again for 8 minutes if the door is reopened. Although I have it working with a true/false variable. Is there a much simpler way to do it?

The method you use is fine. I would have used a Private Boolean, which would have done the same thing as your variable.

Hi, thanks for this. I'm new to HE. Is a private Boolean different to a local variable? What is the difference between the two?

1 Like

It is just a simple Boolean variable that is always available, and private to the rule it was invoked in. Your local variable is much the same in this particular instance (true/false) but can have other content.

I don't know if there is any execution speed or memory penalty either way (LV vs PB). The only advantage I can ascribe to the PB is that it doesn't have to be created for each rule ....

@aaiyar thanks for taking the time to explain. Appreciated :ok_hand:

1 Like

Download the Hubitat app