Help with RM Rule delay off

Hello all

Here is a rule that didn't quite work as expected this morning

My wife was in the kitchen getting coffee, feeding the cats... lights turned on as expected. Several mins later the lights turned off even though she was still in there. A few seconds later her movement turned them back on...

In the logs, I noticed a duplicate delay is over - off command (this seems odd to me unless the rule was running twice)

Another thing I can think of is the delay is too close to the motion reset so I updated the delay off to 90 seconds vs 60 seconds...

Is there a better way to setup this rule to avoid this?

Originally I was using 2 ML rules but they conflicted with each other so I moved them over to this 1 RM rule

Thanks, Rick

I don't see a "Cancel Delayed Actions" action in your Rule. Maybe that should be the first (or possibly second) Action to prevent the problem you've encountered... :thinking: You'll need to work through all of the possible scenarios to determine the best placement.

And @pseudonym's advice of making the delay cancellable, is spot on!

You should add Cancel Delayed Actions after the first IF action and make the off cancelable. I'd also like my delays to be a little longer but I don't think it's necessary, just a preference.

1 Like

I think I would set the rule to only trigger if motion goes active.

Then get rid of the last else-if where you look for all to be inactive. Just add a wait for event with elapsed time right after the if statement. Set the wait to however long you want to allow for no activity.

Then put you off statement for the lights right after the wait with no delay.

I like the wait for event because if any thing goes active it retriggers the rule cancels the wait and it all starts over. No need to add a cancel delay.

Although the cancel delay is also a valid method, remember you also need to make the delay cancelable

1 Like

TY...

I totally forgot about the cancel delays action, added it in.

Love the wait rather than another else-if...

We used to have wait for conditions, seems like that has been removed and we only have wait for event? Or am I missing something

Rick

Now called “Wait for rule”

1 Like

Well that's clear as mud....

Took me long enough to learn the difference between wait for event vs. wait for condition, now I need to remember wait for rule is the same as wait for condition...

So does wait for rule do something different than wait for condition that prompted the change?

More options.