Fire a rule once during 2 times

Hey all, I’m trying to figure out the best way to to get this rule to fire and I don’t see a way to do it. I have a motion sensor that I would like to trigger an on and a color on my light, and then turn off 15 minutes later. That part is easy. The tricky bit is I’d only like it to work once between 8pm and 11:30pm. I thought I saw under restrictions to only fire the rule once, but I don’t see that option anymore.

I think I can do it based on a mode, but I’d have to change my arrival rule to switch to a different mode if I arrive home in between 8 and 11:30. Is that the best way or am I missing something?

Thanks in advance!

Try to use Private Boolean(PB) as the condition.

image

Rule 1 (triggered rule, restricted to be run 8 pm- 11 :30 pm)

When motion sensor triggered, and PB is true, run the action to have light on with color, set PB of Rule 1 to be false. So even after that motion been triggered , rule 1 won't run again since PB is false.

Rule 2
In this rule (running before 8 pm or after 11:30 pm) to set PB of Rule 1 to be True..

Hope it helps...

Thanks for the help! Everything worked like a charm except the light didn’t go off after 15 minutes and I’m not sure why. I need to be up in a few hours so I’ll troubleshoot it tomorrow. The PB worked like a charm though!

Thanks again!

Sorry, missed 15 minutes should be off...

are you doing like this?

The light didn't go off because you set the PB to false without the delay which caused the condition to be false as well.

Yes I did have the delayed off in there. Thanks. I didn't see movement in the logs during the 15 minutes but maybe I missed it. Once I get back from playing my church service today I'll give it another go and report back. I'll try what Navat suggests with delaying the PB to see if that solves it.

Thanks again guys

Navat604 is correct. You also need 15 mins delay for PB set to false. otherwise, condition will be false right away and lights will not be off. I have tested both w/wo delay for PB. with delay, light could be off; without delay for PB setting, light were not off.

Sorry for the delay. I can’t think you both enough it worked flawlessly. Thank you so much for the help

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