# What is the best logic for this flow?

**URL:** <https://community.homey.app/t/what-is-the-best-logic-for-this-flow/146353>\
**Category:** Flows\
**Created:** [December 3, 2025, 11:07pm UTC](https://community.homey.app/t/what-is-the-best-logic-for-this-flow/146353 "2025-12-03T23:07:15Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![dsdevries](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dsdevries/32/80220_2.png) [@dsdevries](https://community.homey.app/u/dsdevries)\
**Post date:** [December 10, 2025, 1:50pm UTC](https://community.homey.app/t/what-is-the-best-logic-for-this-flow/146353/15 "2025-12-10T13:50:41Z")

</div>

Hey @Simon_Salvin ,  
Maybe a little bit late to the party, but I also wrote a tutorial on how deal with motion sensors. It will also allow you to recheck certain conditions during the time that the room is active.

> [@\[HOW TO\] Gain full control over Zone Activity using Motion Sensors (PIR) and Virtual Motion Triggers](https://community.homey.app/t/how-to-gain-full-control-over-zone-activity-using-motion-sensors-pir-and-virtual-motion-triggers/144082):
>
> Introduction This is not a guide on how to implement a specific use case, but rather a framework that will give you full control over zone activity. Many flows like turning on/off lights could be done much simpler. However, when my personal flows became more complex, I ran into a lot of caveats and quirks that caused me to rethink how I work with motion sensors. I came up with this system which allowed me to solve all the bugs I ran into and I would like to share it with all of you. The problem…

---

_[View the full topic](https://community.homey.app/t/what-is-the-best-logic-for-this-flow/146353)._
