Wait for condition duration

Hi guys. Just a spot of help if you can. So I thought "wait for condition" would subscribe if the condition was already met or upon the condition becoming met. So motion already inactive or motion becomes inactive?

If this is the case, I also thought that if a "wait for condition" had a duration of X, then the condition would subscribe if the duration has already been met or when the duration elapses and becomes met. So motion has already been inactive for X or motion becomes inactive for X?

So my rule, seems to be waiting for the ZONE 4 SNUG to be inactive for 1 hour despite it already being inactive for 1 hour and already being "true" (Replicating a wait for event rather than wait for condition)

Ultimately my rule never completes because it retriggers every 30 mins thus the wait for condition never appearing to be met even though it's "true"

See screenshot

If the condition is already true, the duration starts counting at the time when the wait action is reached. (If not, it will wait there until it is, or until the timeout, if specified, whichever happens first). It will not go back in time to try to figure out when an event that may have created that state change happened. Is that what you're asking? If so and it's not what you want, there may be another way to do whatever it is you're looking for. Off hand, it seems like you might be better to trigger on this motion inactive event or any change in motion; periodic triggers are often a cause for scrutiny on an event-driven platform like this.

This is different from a wait for event, by the way. Wait for event needs the actual event to happen. It will not proceed if a condition that the event may have resulted in already happens to be true.

Thanks Robert, you have described exactly what is happening. I don't expect that behaviour but now I understand.

What I'm trying to achieve (with predicates) is;

If we're away then the rule runs every 30 mins (alters the random variables each time) and randomly turns lights on etc assuming no motion within the house for an hour

However, if we're away, if there is motion in the house (because we have babysitters) then the rule will not fully run because motion hasnt been inactive for an hour.

I guess I can figure this differently, but if you have any simple ideas. Here's my full rule


EDIT, I'll remove the motion nsensors inactive for 1 hour and replace with a wait for Boolean variable to become true I.e. if true then complete the rule. I'll write another rule which turns the Boolean to true upon no motion for an hour