# Switching off a light with 2 sensors

**URL:** <https://community.homey.app/t/switching-off-a-light-with-2-sensors/85488>\
**Category:** Flows\
**Tags:** homey-pro\
**Created:** [July 29, 2023, 2:40pm UTC](https://community.homey.app/t/switching-off-a-light-with-2-sensors/85488 "2023-07-29T14:40:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oufman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oufman/32/80176_2.png) [@oufman](https://community.homey.app/u/oufman)\
**Post date:** [July 29, 2023, 2:40pm UTC](https://community.homey.app/t/switching-off-a-light-with-2-sensors/85488/1 "2023-07-29T14:40:07Z")

</div>

Hello everyone, I would like to be able to configure a flow with my 2 motion detectors in the same room.

I want the light to come on if 1 of the detectors is triggered, but I don’t want the 2 motion detectors to be alerted to turn the light off.

I’ll let you see my flow, which doesn’t work.

 ![Capture d’écran 2023-07-29 162446](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/0/f00fe0bda52d53e2cabc8f73ff9854dfd7f03928.jpeg)

The ignition is OK, but the All block doesn’t work.

When the 2 detectors are off, nothing happens.

How can I make it work?

I have a Homey Pro 2023.

Thanks for your help.

Steve

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [July 29, 2023, 3:22pm UTC](https://community.homey.app/t/switching-off-a-light-with-2-sensors/85488/2 "2023-07-29T15:22:30Z")

</div>

Those are _triggers_ and not _conditions_, even if a trigger triggers at the same exact moment, which will never ever happen, they will never activate the same part and thus **not** fulfill the ALL condition.  
Hence you need to add conditions (AND cards):  
[IF] motion deactivates [AND] both sensors’ motion alarm is false (this needs 2 cards, one for each motion sensor) [THEN] turn light off.

Or a better option is using the _zone activity_ for this, as the zone is and stays active as long as one or both motion sensors are active.

---

<div class="post-metadata">

**Author:** ![oufman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oufman/32/80176_2.png) [@oufman](https://community.homey.app/u/oufman)\
**Post date:** [July 30, 2023, 7:58am UTC](https://community.homey.app/t/switching-off-a-light-with-2-sensors/85488/3 "2023-07-30T07:58:40Z")

</div>

Hello Caseda,

Thank you very much for your help, indeed I did not know the subtlety of the active part which is indeed an excellent option!

I’ve just received my Homey box and I’m discovering these features.

Thanks again and have a nice day!
