# Advanced Flow help: Dim lights per zone using FP2 sensors"

**URL:** <https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807>\
**Category:** Questions & Help\
**Tags:** advancedflow\
**Created:** [June 7, 2025, 7:57pm UTC](https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807 "2025-06-07T19:57:43Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rik\_Elsenaar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rik_elsenaar/32/72066_2.png) [@Rik\_Elsenaar](https://community.homey.app/u/Rik_Elsenaar)\
**Post date:** [June 7, 2025, 7:57pm UTC](https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807/1 "2025-06-07T19:57:43Z")

</div>

Hey everyone! 👋

I could really use your help! 🙏 I’m trying to automate my lights using two Aqara FP2 presence sensors for my main floor, which is divided into a living room, kitchen, and dining room. 🛋🍽🍳

The FP2 sensors also recognize the stairs going up and down as separate zones, which opens up some fun automation possibilities. 🌀

Here’s what I want to achieve:

All lights on the floor should be dimmed to a base level (e.g. 30%) when someone is present.

The zone where presence is detected should be set to a higher dim level (e.g. 80%) for better lighting.

So far, I’ve used the following logic:

A variable “Someone on the floor?” (Yes/No)

A variable “Is it dark?” (Yes/No)

A variable “Sensors active?” (Yes/No)

However… the result is a bit of a disco show 🎉😅 — lights flicker constantly and it’s not behaving as expected.

Has anyone done something similar or can guide me on how to build this properly with Homey Flows or Advanced Flow?

Thanks in advance! 💡✨

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [June 7, 2025, 8:32pm UTC](https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807/2 "2025-06-07T20:32:47Z")

</div>

> [@Rik\_Elsenaar](#):
>
> All lights on the floor should be dimmed to a base level (e.g. 30%) when someone is present.

I assume you mean when no one is present. Otherwise Homey tries to set the dim level to both 30% and 80% at the same time 😀.

But, perhaps you could post a screenshot of your flow, so that we can follow along.

---

<div class="post-metadata">

**Author:** ![Rik\_Elsenaar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rik_elsenaar/32/72066_2.png) [@Rik\_Elsenaar](https://community.homey.app/u/Rik_Elsenaar)\
**Post date:** [June 7, 2025, 8:35pm UTC](https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807/3 "2025-06-07T20:35:47Z")

</div>

Well thats the challenge😁 when someone is present on the floor then all the zones where no one is present needs to be 30%

---

<div class="post-metadata">

**Author:** ![Rik\_Elsenaar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rik_elsenaar/32/72066_2.png) [@Rik\_Elsenaar](https://community.homey.app/u/Rik_Elsenaar)\
**Post date:** [June 7, 2025, 8:58pm UTC](https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807/4 "2025-06-07T20:58:04Z")

</div>

![Screenshot_20250607-225523_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/5/75cb723e0aca94fb7ffc4dae43df06beb9e6396e.jpeg)  
 ![Screenshot_20250607-225540_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/4/344c5da2a8f45ec3a1a6ed248cecbf6a6a03834e.jpeg)  
 ![Screenshot_20250607-225549_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/4/94c2953d8095ae6dc9035430e78a25b0716a46e3.jpeg)  
Im sorry for the big mess… im on my tablet and you really cant organize it unless youre on the laptop

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [June 8, 2025, 9:11am UTC](https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807/5 "2025-06-08T09:11:48Z")

</div>

Before starting to unravel your spaghetti 😊 😅 some observations.

It seems that you use the same trigger (WHEN card) for multiple flows. Like ‘Zone Occupancy Zone 0’ werd bezet’. That’s fine, however you are also updating and checking variables used in both flows. E.g. the ‘Presence eerste verdieping’ variable is set to Yes in the first flow in the first screenshot. You check the state of that same variable in the flow in the bottom part of your first screenshot. You can run into the situation that the first flow has not yet finished updating the variable, while you have already checked it in your second flow and hence may get an incorrect value. You can solve this by first determining what would be the correct order of execution and adding a delay (e.g. a 1 sec delay flow card) in the subsequent flow (after the WHEN card).

I have no experience with this presence sensor, but what is the difference between ‘Zone Occupancy Zone # werd bezet’ and ‘Zone Bezettingszone # werd bezet’? Sounds like it is the same.

---

<div class="post-metadata">

**Author:** ![Rik\_Elsenaar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rik_elsenaar/32/72066_2.png) [@Rik\_Elsenaar](https://community.homey.app/u/Rik_Elsenaar)\
**Post date:** [June 8, 2025, 9:42am UTC](https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807/6 "2025-06-08T09:42:32Z")

</div>

Im going to unravvle the spaghetti tonight after work🤣..

But the difference between the 2 numbers are 0 = the total zone and each number is a zone in the 0 zone… So for example zone 1 is the kitchen zone 2 is the dining area and zone 3 and 4 are the stairs going up and down.

This is the first time that i try this with 2 sensors for the entire floor, but the main difference with a normal motion sensor is that the occupied/not-occupied is instant and has nog delay when turning off.

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [June 8, 2025, 9:52am UTC](https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807/7 "2025-06-08T09:52:40Z")

</div>

Haha, okay. Enjoy your spaghetti 🤣 !

So the:

- ‘Zone Occupancy Zone #’ items relate to the first sensor, and the
- ‘Zone Bezettingszone #’ items to the second sensor?

---

<div class="post-metadata">

**Author:** ![Rik\_Elsenaar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rik_elsenaar/32/72066_2.png) [@Rik\_Elsenaar](https://community.homey.app/u/Rik_Elsenaar)\
**Post date:** [June 8, 2025, 10:06am UTC](https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807/8 "2025-06-08T10:06:22Z")

</div>

Thanks! This is what happens when you wanna do something real quick🤣

No the can be the same sensor but when you create a zone in the sensor like in the picture every color is a different zone and gray is the border. Zone 0 is the total view of the sensor, and ever number higher than that is zone 1, 2 etc.

 ![1000013492](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/7/37679899b54c3267890c8fc19ed69393f03a44ad.png)

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [June 8, 2025, 10:14am UTC](https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807/9 "2025-06-08T10:14:28Z")

</div>

😀

I understand that zone 0 is the umbrella/overarching zone and 1,2, 3, etc. sub-zones.

I was referring to two different zone names (with the same number), that sounds to me like they may be the same: Is ‘Occupancy Zone 0’ the same zone as ‘Bezettingszone 0’? So one has an English name and the other a Dutch name. Or do they refer to different overarching zones of different sensors?

---

<div class="post-metadata">

**Author:** ![Rik\_Elsenaar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rik_elsenaar/32/72066_2.png) [@Rik\_Elsenaar](https://community.homey.app/u/Rik_Elsenaar)\
**Post date:** [June 8, 2025, 10:18am UTC](https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807/10 "2025-06-08T10:18:31Z")

</div>

Ah now i understand! No those are 2 different sensors. One is de one i shared the picture (it sees kitchen etc) the otherone sees only my living area

---

<div class="post-metadata">

**Author:** ![Rik\_Elsenaar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rik_elsenaar/32/72066_2.png) [@Rik\_Elsenaar](https://community.homey.app/u/Rik_Elsenaar)\
**Post date:** [June 8, 2025, 10:19am UTC](https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807/11 "2025-06-08T10:19:51Z")

</div>

So what i wanted to do with the logic in the upper part of the first screenshot is. When one of the 2 sees someone then the presence for the entire floor is set to yes

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [June 8, 2025, 10:31am UTC](https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807/12 "2025-06-08T10:31:05Z")

</div>

Thanks for clarifying 👍.

So my main recommendation for now, as indicated above, is to allow time for Homey to update variables shared across multiple flows, by adding a 1 sec delay in subsequent flows that are triggered by the same trigger. May that already solves (part) of the current behavior.

---

<div class="post-metadata">

**Author:** ![Rik\_Elsenaar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rik_elsenaar/32/72066_2.png) [@Rik\_Elsenaar](https://community.homey.app/u/Rik_Elsenaar)\
**Post date:** [June 8, 2025, 10:32am UTC](https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807/13 "2025-06-08T10:32:50Z")

</div>

Thanks i will try it and clear up the spaghetti and show it again

---

<div class="post-metadata">

**Author:** ![UseMeDontAbuseMe](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/usemedontabuseme/32/89412_2.png) [@UseMeDontAbuseMe](https://community.homey.app/u/UseMeDontAbuseMe)\
**Post date:** [June 16, 2025, 5:41pm UTC](https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807/14 "2025-06-16T17:41:58Z")

</div>

How did you even get FP2 sensor to work with Homey??? I can not find sensor in aqara list!!!

---

<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:** [June 16, 2025, 10:52pm UTC](https://community.homey.app/t/advanced-flow-help-dim-lights-per-zone-using-fp2-sensors/137807/15 "2025-06-16T22:52:13Z")

</div>

Because it’s a wifi sensor!!!  
Did you try the forum search function???  
[https://community.homey.app/search?context=topic&context\_id=66471&q=aqara%20FP2](https://community.homey.app/search?context=topic&context_id=66471&q=aqara%20FP2)

Here is the app you can use!!!

> [@\[APP\]\[Pro\] HomeKit Controller - for a better Homey](https://community.homey.app/t/app-pro-homekit-controller-for-a-better-homey/94520):
>
> Project started as a way to include the Aqara FP2-sensor via Homekit into Homey. App is now more generic, many services and capabilities are supported. If you encounter problems, please PM me a short note and a copy of the log where you add the device. Generic procedure to add a device. Add your Homekit capable device to the app that came with the device and configure it. If added with iOS device, remove the device from the iOS Home app, a device only can have one controller. Most of …

Enjoy!!!
