Wait until (and) flow

Guys I want to create a flow that is triggered when my presense is set to home. However i dont want the flow to act untill the door contact is openend. I noticed that when the trigger is announced after a certain time if the "and"criteria is not met it just cancel that flow execution. Is there anyway i can make the flow wait in the “and” section till the criteria becomes “True”? Btw i cant use delay because i cant predict how long it would take to reach the door.
Kind regards.

For a Homey Pro?

Flow 1
When I come home
Then Start timer for 5 minutes

Flow 2
When door opens
And timer is running
Then do action and stop timer

From your description I conclude that “presence is home” will always occur before the “door contact is opened”.
Is that always true? (Depending on the way you do it it can have delays)

If it is not… it will be a bit more complex than @dijkers solution

You might need to add some extra flows for that case:

Flow 3
When door opens
Then Start timer for 1 minute (or more if presence detection takes longer)

Flow 4
When I come home
And timer is running
Then do action and stop timer

That is the issue i cant predict how long it would take to reach the door. Another issue is that you cant use a timer in the Flow “AND” section.

Any other idea?

What is the maximum you would accept as time?

When your presence is detected earlier then you open the door @Dijker solution wil be working.
You can even extend the timeframe

1 Like

I’m using logics for this.

You need a Boolean called something like SensorTriggerdSinceDisarm

Flow 1
When: Someone came home
Then: Set SensorTriggerdSinceDisarm to No
Then: Enable Flow 2

Flow 2
When: Any contact sensor trigger
Then: Set SensorTriggerdSinceDisarm to Yes

Flow 3
When: Logic SensorTriggerdSinceDisarm changed
And: Logic SensorTriggerdSinceDisarm is Yes
Then: Do your magic
Then: Disable Flow 2

So when you get home, flow 2 will wait for you to open the door. Then Flow 3 will kick in.
Enabling and disabling flow 2 is to save resources in Homey. Otherwise it will trigger every time a contact sensor triggers. It may not be an issue in this specific case, but if you have motion sensors doing this in a busy house with many flows it starts to make sense.

Good luck!

Depends on the timer app you use?

.

Set the timer to 120mins, to 4hrs or even to 24hrs. That doesn’t matter.
As long as

  • the timer still runs after you came home and open the door for the 1st time at some point
  • you (read: the flow) should STOP the timer when the door opens