# Advanced Flow Help for turning off lights with presence sensor

**URL:** <https://community.homey.app/t/advanced-flow-help-for-turning-off-lights-with-presence-sensor/102215>\
**Category:** Questions & Help\
**Tags:** homey-pro, advancedflow\
**Created:** [January 25, 2024, 3:42am UTC](https://community.homey.app/t/advanced-flow-help-for-turning-off-lights-with-presence-sensor/102215 "2024-01-25T03:42:28Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![EE\_PE\_Savage](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ee_pe_savage/32/94365_2.png) [@EE\_PE\_Savage](https://community.homey.app/u/EE_PE_Savage)\
**Post date:** [January 25, 2024, 3:42am UTC](https://community.homey.app/t/advanced-flow-help-for-turning-off-lights-with-presence-sensor/102215/1 "2024-01-25T03:42:28Z")

</div>

Hello!

Apologies if I am missing something simple.

I am using an Aqara FP2 presence sensor and I want the Homey Pro to turn off all of the lights in the basement after there has been no presence detected for X minutes. Originally I used the delay function, but quickly learned that once motion wasn’t detected (even if briefly) that it started the timer and turned off the lights even if I was in the room and it was sensing presence.

So then I tried to create a flow with an extra step after the time to check if there is presence and to turn off if there is no presence and to not perform any action if there is presence. The attached image shows my current attempt, but it isn’t functioning as expected. Any guidance is appreciated!

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/2/d24ad63e848fb23bd7be291d76642d9959a681c9.png)

---

<div class="post-metadata">

**Author:** ![ReidarRoen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/reidarroen/32/33964_2.png) [@ReidarRoen](https://community.homey.app/u/ReidarRoen)\
**Post date:** [January 25, 2024, 8:45am UTC](https://community.homey.app/t/advanced-flow-help-for-turning-off-lights-with-presence-sensor/102215/2 "2024-01-25T08:45:34Z")

</div>

There are many ways to control the light in relation to the use of presence sensors. Here is a simple example of how I easily do it. In other cases, I have defined different values for the light depending on the time of day. Then it can become a little more complicated, but still clear with advanced flow.

 ![Skjermbilde 2024-01-25 kl. 09.39.11](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/8/483b4c03af392cefcb3b77e109ef9333943f2f9b.png)

---

<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:** [January 25, 2024, 9:28am UTC](https://community.homey.app/t/advanced-flow-help-for-turning-off-lights-with-presence-sensor/102215/3 "2024-01-25T09:28:03Z")

</div>

Use a timer/countdown:  
If zone became free then (re-)start timer.

If zone (re-)occupied then stop timer; turn on lights when they are off and it is dark.

If timer ends then turn off lights.

---

<div class="post-metadata">

**Author:** ![EE\_PE\_Savage](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ee_pe_savage/32/94365_2.png) [@EE\_PE\_Savage](https://community.homey.app/u/EE_PE_Savage)\
**Post date:** [January 25, 2024, 7:15pm UTC](https://community.homey.app/t/advanced-flow-help-for-turning-off-lights-with-presence-sensor/102215/4 "2024-01-25T19:15:57Z")

</div>

Appreciate the help! That totally makes sense and is much more straight forward that I thought, thanks!

---

<div class="post-metadata">

**Author:** ![Jurek\_Chlebowski](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jurek_chlebowski/32/111461_2.png) [@Jurek\_Chlebowski](https://community.homey.app/u/Jurek_Chlebowski)\
**Post date:** [July 27, 2024, 6:55pm UTC](https://community.homey.app/t/advanced-flow-help-for-turning-off-lights-with-presence-sensor/102215/5 "2024-07-27T18:55:33Z")

</div>

Hi,

thanks for your flow, it works pretty well, it gave me an inspiration how to use it at my place, many thanks…

J.

---

<div class="post-metadata">

**Author:** ![Rob\_Morris](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rob_morris/32/131974_2.png) [@Rob\_Morris](https://community.homey.app/u/Rob_Morris)\
**Post date:** [April 13, 2025, 2:08am UTC](https://community.homey.app/t/advanced-flow-help-for-turning-off-lights-with-presence-sensor/102215/6 "2025-04-13T02:08:47Z")

</div>

I think this is exactly what I am looking for (except for the ‘if it’s dark’ part (my kitchen has no window, it’s literally always dark - I live in an apartment). My problem is I am very VERY new - just started really messing with Homey this morning.

Would someone be willing to make this flow and screenshot, post it, so I can try and recreate it?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [April 14, 2025, 9:31pm UTC](https://community.homey.app/t/advanced-flow-help-for-turning-off-lights-with-presence-sensor/102215/7 "2025-04-14T21:31:39Z")

</div>

> [@The Flow Exchange(r) - Exchange Your Flows with Others!](https://community.homey.app/t/the-flow-exchange-r-exchange-your-flows-with-others/68981/8):
>
> #### Zone Activity Controlled Light / Device
> 
> To prevent the light (or other device) from turning off (or on), while there’s still motion detected.

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

Here’s more (importable) example flows:

> [@The Flow Exchange(r) - Exchange Your Flows with Others!](https://community.homey.app/t/the-flow-exchange-r-exchange-your-flows-with-others/68981):
>
> If you have questions about the App Device Capabilities or seek help with an Flow or with the Flow Exchanger, please see the [Device Capabilities Topic](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287). [German](https://community.homey.app/t/the-flow-exchange-r-helfen-und-fragen-stellen/69807)[Another German topic](https://community.homey.app/t/device-capabilities/67934)[English](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287) If you have questions about the Advanced Virtual Device or seek help with the Exchanger File, please see the [Advanced Virtual Devices Topic](https://community.homey.app/t/app-pro-device-capabilities-addendum-fully-customisable-advanced-virtual-device-with-unique-text-status-indicator/68198). [German](https://community.homey.app/t/teilen-sie-ihr-gerat-erweiterte-virtuelle-gerate-aus-den-geratefahigkeiten/69583)[English](https://community.homey.app/t/app-pro-device-capabilities-addendum-fully-customisable-advanced-virtual-device-with-unique-text-status-indicator/68198) If you want to post a AVD as a Template for others to use, please post it on [Share Your Device! - Advanced Virtual Devices](https://community.homey.app/t/share-your-device-advanced-virtual-devices-from-device-capabilities/68676). [German](https://community.homey.app/t/teilen-sie-ihr-gerat-erweiterte-virtuelle-gerate-aus-den-geratefahigkeiten/69583)[English](https://community.homey.app/t/share-your-device-advanced-virtual-devices-from-device-capabilities/68676)[Eng…](https://community.homey.app/t/share-your-device-hcs-edition-advanced-virtual-devices-from-device-capabilities/69558)

---

<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:** [February 26, 2026, 2:37pm UTC](https://community.homey.app/t/advanced-flow-help-for-turning-off-lights-with-presence-sensor/102215/8 "2026-02-26T14:37:41Z")

</div>

Hi  
How will this look in flows - not sure how to set this up?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 26, 2026, 5:42pm UTC](https://community.homey.app/t/advanced-flow-help-for-turning-off-lights-with-presence-sensor/102215/9 "2026-02-26T17:42:59Z")

</div>

Shown here:

> [@Advanced Flow Help for turning off lights with presence sensor](https://community.homey.app/t/advanced-flow-help-for-turning-off-lights-with-presence-sensor/102215/7):
>
> Here’s more (importable) example flows:
