Loop part off flow

Hi
I have some lights by the front door that are turned on when the door opens at night.
I would like the lights stay be turned on if the door is open, but off 2 min after door is closed.
I have this, but there must be a better way to do that?

Any great advice?

Regards
Thomas

Split it in two actions for the door contact.

First: If contact alarm is turned on then switch on the lights.

Second: If contact alarm is turned off for two minutes turn off the lights

There a trigger ‘contact sensor alarm turned off’.

(You can have more than one triggers per canvas)

So add
WHEN
contact alarm turned off
wait
THEN
turn off light.

With the latest firmware versions of Homey you have the possibilty use the flow card:

“When contact alarm turned off for x minutes”.

You then don’t have to add the wait anymore.

Perfect, thanks!!!