# Loop part off flow

**URL:** https://community.homey.app/t/loop-part-off-flow/152856
**Category:** Questions & Help
**Created:** [March 23, 2026, 9:26am UTC](https://community.homey.app/t/loop-part-off-flow/152856 "2026-03-23T09:26:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![TThrane](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tthrane/32/154923_2.png) [@TThrane](https://community.homey.app/u/TThrane)
#### Post date: [March 23, 2026, 9:26am UTC](https://community.homey.app/t/loop-part-off-flow/152856/1 "2026-03-23T09:26:00Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/e/7e0073fb8aa2859dace541b2b6c369e0c663ffce.png)

---

<div class="post-metadata">

### Author: ![Hsd1965](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hsd1965/32/30160_2.png) [@Hsd1965](https://community.homey.app/u/Hsd1965)
#### Post date: [March 23, 2026, 9:40am UTC](https://community.homey.app/t/loop-part-off-flow/152856/2 "2026-03-23T09:40:13Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Wim\_Post](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wim_post/32/56793_2.png) [@Wim\_Post](https://community.homey.app/u/Wim_Post)
#### Post date: [March 23, 2026, 9:42am UTC](https://community.homey.app/t/loop-part-off-flow/152856/3 "2026-03-23T09:42:40Z")

</div>

> [@TThrane](#):
>
> but there must be a better way to do that?

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.

---

<div class="post-metadata">

### Author: ![Hsd1965](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hsd1965/32/30160_2.png) [@Hsd1965](https://community.homey.app/u/Hsd1965)
#### Post date: [March 23, 2026, 9:51am UTC](https://community.homey.app/t/loop-part-off-flow/152856/4 "2026-03-23T09:51:26Z")

</div>

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.

 ![Screenshot 2026-03-23 105217](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/9/9934467623c9eb5fd0cd8d0dfec9ac7322ee55da.png)

---

<div class="post-metadata">

### Author: ![TThrane](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tthrane/32/154923_2.png) [@TThrane](https://community.homey.app/u/TThrane)
#### Post date: [March 23, 2026, 11:02am UTC](https://community.homey.app/t/loop-part-off-flow/152856/5 "2026-03-23T11:02:36Z")

</div>

Perfect, thanks!!!
