# Motion Light Flow

**URL:** <https://community.homey.app/t/motion-light-flow/29258>\
**Category:** Flows\
**Created:** [May 2, 2020, 1:13pm UTC](https://community.homey.app/t/motion-light-flow/29258 "2020-05-02T13:13:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gy\_1977](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gy_1977/32/16573_2.png) [@gy\_1977](https://community.homey.app/u/gy_1977)\
**Post date:** [May 2, 2020, 1:13pm UTC](https://community.homey.app/t/motion-light-flow/29258/1 "2020-05-02T13:13:53Z")

</div>

Hi I’m needing help to create a flow that

When motion detected turns on gym light. I’m using a fibaro motion sensor.

When I’m in the gym and I Manually turn the light off to do a workout I want it to stay off until my workout is finished and I leave the gym.

When I enter the gym again I want to come back on as per the opening sentence.

Help appreciated.

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [May 2, 2020, 3:16pm UTC](https://community.homey.app/t/motion-light-flow/29258/2 "2020-05-02T15:16:18Z")

</div>

You probably need another sensor to detect when you come-in/go-out

---

<div class="post-metadata">

**Author:** ![Osorkon](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/osorkon/32/43026_2.png) [@Osorkon](https://community.homey.app/u/Osorkon)\
**Post date:** [May 2, 2020, 4:19pm UTC](https://community.homey.app/t/motion-light-flow/29258/3 "2020-05-02T16:19:03Z")

</div>

A similar task (Fibaro Dimmer 2 + Fibaro MS) I solved in this way.  
Dimmer 2 is connected to a double switch. One push button is connected to S1 and the another one to S2.

Usually the light will be switched on by motion and no motion switched of (using a timer).  
If I don’t want switch the light off automaticly, I push the button conected to S2 and deactivate in this way the flow that is responsible to switch of the light.  
By switching the light off manually the flow will be activated again.

Maybe this can be an inspiration for you to find a solution for your task.

---

<div class="post-metadata">

**Author:** ![gy\_1977](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gy_1977/32/16573_2.png) [@gy\_1977](https://community.homey.app/u/gy_1977)\
**Post date:** [May 2, 2020, 4:28pm UTC](https://community.homey.app/t/motion-light-flow/29258/4 "2020-05-02T16:28:46Z")

</div>

My lights have a dimmer 2 already installed, this could be very interesting.

Could you show me your flows please and I think I know how to wire the 2nd switch.

---

<div class="post-metadata">

**Author:** ![Shakesbeard](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/shakesbeard/32/15112_2.png) [@Shakesbeard](https://community.homey.app/u/Shakesbeard)\
**Post date:** [May 2, 2020, 4:42pm UTC](https://community.homey.app/t/motion-light-flow/29258/5 "2020-05-02T16:42:35Z")

</div>

You just need to remember the manual off in a logic variable and then reset the variable once the zone became inactive and voila.

---

<div class="post-metadata">

**Author:** ![Osorkon](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/osorkon/32/43026_2.png) [@Osorkon](https://community.homey.app/u/Osorkon)\
**Post date:** [May 2, 2020, 6:10pm UTC](https://community.homey.app/t/motion-light-flow/29258/6 "2020-05-02T18:10:19Z")

</div>

Flow 1 to 4 is more or less a standard for my Light automatic.  
Flow 5 and 6 to deactivate/ activate the automatic switch off.

Flow 1  
When Motion alarm goes on  
And light is off  
Then switch light on

Flow 2  
When motion alarm goes off  
And Light is on  
Then start Timer with 120s

Flow 3  
When Timer reaches O  
And no motion  
Then switch light off  
Else  
Start Timer with 120s

Flow 4  
When light is switched on  
And no motion  
Then start timer with 120s

Flow 5  
When S2 1-Klick  
And Light is on  
Then deactivate Flow 3  
Else  
Deactivate Flow 3  
And switch light on

Flow 6  
When light switched off  
And Flow 3 is deactivated  
Then activate Flow 3

The same you can do to prevent the light to be switched on automatically.

Flow 5\*  
When S2 1-Klick  
And Light is on  
Then deactivate Flow 1  
And switch light off  
Else  
Deactivate Flow 1

Flow 6\*  
When light switched on  
And Flow 1 is deactivated  
Then activate Flow 1

---

<div class="post-metadata">

**Author:** ![gy\_1977](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gy_1977/32/16573_2.png) [@gy\_1977](https://community.homey.app/u/gy_1977)\
**Post date:** [May 2, 2020, 9:36pm UTC](https://community.homey.app/t/motion-light-flow/29258/7 "2020-05-02T21:36:27Z")

</div>

Could you give more info

---

<div class="post-metadata">

**Author:** ![gy\_1977](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gy_1977/32/16573_2.png) [@gy\_1977](https://community.homey.app/u/gy_1977)\
**Post date:** [May 2, 2020, 9:36pm UTC](https://community.homey.app/t/motion-light-flow/29258/8 "2020-05-02T21:36:35Z")

</div>

Thanks for your help
