Timeout and duration together

Updated today to the new 2.3.0.113 version. I was trying to make a rule where if the motion is inactive for 8 minutes, turn off the light. I added the wait for expression and used the duration. I also wanted to add a timeout on the wait event. Can this not be done anymore?

I was thinking that I could say wait for inactive with a duration of 8 minutes but timeout after 20 and exit rule. It appears to be either/or now.

1 Like

As far as I know, this has always been an if/or. However, the option to combine both could be useful in some situations. @bravenel?

No, this isn't in the current implementation. I don't understand what this does for you. If the light isn't going to turn off after 8 minutes, what does 20 minutes have to do with anything? The rule has already 'exited'. What is the trigger of this rule?

I could potentially be misunderstanding the duration. My thought was that using the wait for rule (or expression I think it is now) with an eight minute duration means that the motion would have to be inactive for eight minutes before the rule progressed. If the motion never stayed inactive for eight minutes straight, then the rule would continue to wait for that to become true. A re-trigger of the rule would cancel it I guess.

My thought was that if the rule never reached 8 minutes straight of inactivity, then timeout after 20. That would assume people were in the room and it was going to be occupied for an extended time. The timeout would just allow the rule to stop trying to catch the 8 minute duration of the motion being inactive and exit.

Are you saying the rule will exit without meeting the duration of it doesn't happen? The trigger is that the motion is inactive.

I'm sorry this is hard to understand. What's the effective difference between waiting for the 8 minutes of inactive, and just giving up as you suggest a timeout would do? Do you want the timeout to turn off the light, or just 'exit'?

Please answer my question about what triggers the rule.

The trigger is when the motion changes. I guess the person in the room wouldn't know the difference, but the hub would continue to try endlessly if there was not 8 straight minutes of inactivity. I'm assuming that the wait for expression is cancelled when/if the rule is re-triggered? If the rule keeps filtering down to the wait though, it basically refreshes the wait and starts over in a holding pattern.

Yes, this is correct. But still, what does the timeout get you? You don't want it to turn off the lights, since someone is still in the room. Even if this existed it would further complicate things because now you'd have to know whether the wait ended from duration or timeout, to know what to do next.

And irrespective, every time motion goes active the rule is going to retriever, starting the timer over again for the duration. So it could never get to a timeout.