# Motion detection with on- and off-transitions

**URL:** <https://community.homey.app/t/motion-detection-with-on-and-off-transitions/125561>\
**Category:** Questions & Help\
**Tags:** advancedflow\
**Created:** [December 27, 2024, 9:20am UTC](https://community.homey.app/t/motion-detection-with-on-and-off-transitions/125561 "2024-12-27T09:20:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Bos](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_bos/32/120823_2.png) [@Peter\_Bos](https://community.homey.app/u/Peter_Bos)\
**Post date:** [December 27, 2024, 9:20am UTC](https://community.homey.app/t/motion-detection-with-on-and-off-transitions/125561/1 "2024-12-27T09:20:01Z")

</div>

Hello readers,

I’ve just started using Homey Pro and I want to make an actitvity flow, combined with transitions and check of the current luminance level.  
What I’ve come up with is the following advanced flow:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/9/09afb3d40bfc639217c60282984f085e20ef495a.png)

I was wondering:

- Am I making it to complex?
- Would it be better to split the flow in seperate flows? (i.e. check activity, execute transitions, etc)
- Are there any steps that are wrong/not logical?

I looks like this flow is working for me, with one minor issue: If there has’nt been any activity for 10 minutes and for some reason the light is switched on, it will stay on.  
( I think I can make it work, but then I would add a variable, which would make the flow even more complex 🙂 )

Thank you for reading this and any recommendations.

Peter

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [December 27, 2024, 9:28am UTC](https://community.homey.app/t/motion-detection-with-on-and-off-transitions/125561/2 "2024-12-27T09:28:11Z")

</div>

> [@Peter\_Bos](#):
>
> - Would it be better to split the flow in seperate flows?

Personally I like to spit

- makes it more readable
- Easier to debug (especially when you add simple log cards to every flow)
- Less risk on entanglements

But hey, if it works…
