# The lights turn off when the zone is active

**URL:** <https://community.homey.app/t/the-lights-turn-off-when-the-zone-is-active/59005>\
**Category:** Flows\
**Tags:** flow\
**Created:** [January 23, 2022, 11:15pm UTC](https://community.homey.app/t/the-lights-turn-off-when-the-zone-is-active/59005 "2022-01-23T23:15:37Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![DingDong](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dingdong/32/48779_2.png) [@DingDong](https://community.homey.app/u/DingDong)\
**Post date:** [January 23, 2022, 11:15pm UTC](https://community.homey.app/t/the-lights-turn-off-when-the-zone-is-active/59005/1 "2022-01-23T23:15:37Z")

</div>

Howdy!

I have some flows to turn off the lights when the different zones become inactive.

My problem is that the zone becomes inactive when I brush my teeth at night. And the zone wont reactivate when I wave my hands inn the dark trying to tell the Aeotec Multisensor 7 that im still alive!😅

This is the ms7 settings:

 ![Screenshot_20220124-000037_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/4/748107c1d7efb06d66d34471085ae205d0f0805f.jpeg)

(Yes, the sensor is installed correctly and will be able to see me everywhere in the tiny bathroom)

The flow is super basic: turn off zigbee dimmer after the zone have been inactive for 10 minutes.

Can anybody explain why this is happening?

---

<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:** [January 24, 2022, 8:21am UTC](https://community.homey.app/t/the-lights-turn-off-when-the-zone-is-active/59005/2 "2022-01-24T08:21:44Z")

</div>

My guess is:  
Change “Motion Untrigger time” to 29s

If it doesn’t change much, use a timer instead.  
Flow1  
If…  
Zone is active  
Then…  
Turn on lamp A  
Start or replace timer X

Flow2  
If…  
Timer X has stopped / ended  
Then…  
Turn off lamp A

---

<div class="post-metadata">

**Author:** ![Geir\_DANIELSEN](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/geir_danielsen/32/49198_2.png) [@Geir\_DANIELSEN](https://community.homey.app/u/Geir_DANIELSEN)\
**Post date:** [April 22, 2023, 3:04pm UTC](https://community.homey.app/t/the-lights-turn-off-when-the-zone-is-active/59005/3 "2023-04-22T15:04:09Z")

</div>

Hello, did u find a solution on this?

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [April 23, 2023, 11:44am UTC](https://community.homey.app/t/the-lights-turn-off-when-the-zone-is-active/59005/4 "2023-04-23T11:44:13Z")

</div>

> [@Peter\_Kawa](#):
>
> Change “Motion Untrigger time” to 29s

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

So the _ **Motion Untrigger Time** _ must be greater than the _ **Motion Retrigger Time** _!

@DingDong, if the MS7 is the only sensor in the zone that activates/deactivates the zone, you can use the  
_ **This zone became active** _ and _ **This zone is inactive for 10 minutes** _

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/b/9b7f9c543f72569849a993cc02df534c054f4eb4.png)  
(Sorry, only in German language)

@Geir_DANIELSEN, what exactly is your problem?

---

<div class="post-metadata">

**Author:** ![Geir\_DANIELSEN](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/geir_danielsen/32/49198_2.png) [@Geir\_DANIELSEN](https://community.homey.app/u/Geir_DANIELSEN)\
**Post date:** [April 23, 2023, 1:30pm UTC](https://community.homey.app/t/the-lights-turn-off-when-the-zone-is-active/59005/5 "2023-04-23T13:30:53Z")

</div>

Have made flow like yours, but some times the light turn off when im inside the rom

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [April 23, 2023, 2:15pm UTC](https://community.homey.app/t/the-lights-turn-off-when-the-zone-is-active/59005/6 "2023-04-23T14:15:24Z")

</div>

Could you please provide some more information? Motion sensor? Settings?  
Could you please also post the flow?

---

<div class="post-metadata">

**Author:** ![Geir\_DANIELSEN](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/geir_danielsen/32/49198_2.png) [@Geir\_DANIELSEN](https://community.homey.app/u/Geir_DANIELSEN)\
**Post date:** [April 23, 2023, 4:25pm UTC](https://community.homey.app/t/the-lights-turn-off-when-the-zone-is-active/59005/7 "2023-04-23T16:25:46Z")

</div>

![bilde](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/f/2ffec669af7ed56f66f9d1f514e525472ef3eb37.png)

---

<div class="post-metadata">

**Author:** ![Geir\_DANIELSEN](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/geir_danielsen/32/49198_2.png) [@Geir\_DANIELSEN](https://community.homey.app/u/Geir_DANIELSEN)\
**Post date:** [April 23, 2023, 4:28pm UTC](https://community.homey.app/t/the-lights-turn-off-when-the-zone-is-active/59005/8 "2023-04-23T16:28:27Z")

</div>

![bilde](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/e/fedef8984ab8995998a340662d50f81add9d8c30.png)

I use Aeotec multisensor 7

---

<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 23, 2023, 8:01pm UTC](https://community.homey.app/t/the-lights-turn-off-when-the-zone-is-active/59005/9 "2023-04-23T20:01:59Z")

</div>

@DirkG I guessed wrong, but I didn’t get any confirmation, until now that is 🙃

@Geir_DANIELSEN  
I’ve also moments when the light turns off while I’m still in the room  
I think this flow reduces that quite a bit, by adding a timer;  
Every time the zone is re-activated, the timer is paused  
When the zone is inactive, start the timer with a duration of X seconds, and the light turns off when the timer is finished:

> [@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):
>
> ![Screenshot from 2022-09-21 00-48-34](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/a/2aa742727e50bc75f1e9b207663d1b8b84560c32.png)

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [April 24, 2023, 7:12am UTC](https://community.homey.app/t/the-lights-turn-off-when-the-zone-is-active/59005/10 "2023-04-24T07:12:52Z")

</div>

The reason why your flow doesn’t work as you wish is, because you use the delay card instead of a timer, like Peter does.  
The problem with the delay card is, once the flow has been started because the zone became inactive for a short moment, the light will be switched off after 30 seconds, independent of if the zone was activated again within the 30 seconds.

So you can use the card “Zone is inactive for x minutes”, or you can use a timer (see Peter’s example, or this [tutorial](https://community.homey.app/t/simple-lights-turning-on-off-based-on-motion/10889)).
