# Simple motion detector flow now working, looking for guidance

**URL:** https://community.homey.app/t/simple-motion-detector-flow-now-working-looking-for-guidance/122904
**Category:** Questions & Help
**Tags:** flow, homey-pro
**Created:** [December 6, 2024, 8:12am UTC](https://community.homey.app/t/simple-motion-detector-flow-now-working-looking-for-guidance/122904 "2024-12-06T08:12:10Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![320\_Atlantic\_Avenue](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/320_atlantic_avenue/32/120757_2.png) [@320\_Atlantic\_Avenue](https://community.homey.app/u/320_Atlantic_Avenue)
#### Post date: [December 6, 2024, 8:12am UTC](https://community.homey.app/t/simple-motion-detector-flow-now-working-looking-for-guidance/122904/1 "2024-12-06T08:12:10Z")

</div>

Hey all,

Just getting into Homey and running into an issue. I want to make an simple flow to make a motion detector turn on a light after a certain time in the evening but before sunrise, but it does not work. What am I doing wrong with this?

Thank you.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/6/869a8ba30e60a54facd84c9fbea5a9c58fb76354.png)

---

<div class="post-metadata">

### Author: ![PetervdK](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/petervdk/32/20669_2.png) [@PetervdK](https://community.homey.app/u/PetervdK)
#### Post date: [December 6, 2024, 8:54am UTC](https://community.homey.app/t/simple-motion-detector-flow-now-working-looking-for-guidance/122904/2 "2024-12-06T08:54:09Z")

</div>

1. Are your location and time correct?
2. Does the motion sensor trigger at all? You can send a (push) notification in the AND section to verify that.

---

<div class="post-metadata">

### Author: ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)
#### Post date: [December 6, 2024, 8:59am UTC](https://community.homey.app/t/simple-motion-detector-flow-now-working-looking-for-guidance/122904/3 "2024-12-06T08:59:24Z")

</div>

Just start by the simplest flow by deleting the AND cards and replace the WHEN card by a notification to the time line. If that works as expected, add extra cards one by one.

 ![IMG_3693](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/3/234fef008f5a51eb3645e59809d998880384e857.jpeg)

---

<div class="post-metadata">

### Author: ![Wim\_Post](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wim_post/32/56793_2.png) [@Wim\_Post](https://community.homey.app/u/Wim_Post)
#### Post date: [December 6, 2024, 9:34am UTC](https://community.homey.app/t/simple-motion-detector-flow-now-working-looking-for-guidance/122904/4 "2024-12-06T09:34:39Z")

</div>

Say there’s motion at 5:00. That is before sunrise but not after 23:00

Try ‘it’s between 23:00 and 12:00’

 ![IMG_1822](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/6/c62b315d63bfc560f7221049b9fbdd967922c15f.jpeg)

i tested this flow getest at 10:45. ‘It is between 23:00 and 12:00’ is true. ‘it’s before sunrise’ is false. So the ‘else’-card is executed.

---

<div class="post-metadata">

### Author: ![Kyle\_Michiels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kyle_michiels/32/120769_2.png) [@Kyle\_Michiels](https://community.homey.app/u/Kyle_Michiels)
#### Post date: [December 6, 2024, 10:04am UTC](https://community.homey.app/t/simple-motion-detector-flow-now-working-looking-for-guidance/122904/5 "2024-12-06T10:04:44Z")

</div>

This seems to be the most logical answer.  
Before sunrise would mean between 04:30 PM and 8:30 AM  
But your other codition is AFTER 11PM, so it will never trigger during the hours of 12 AM and sunrise since they are not after 11PM and thus it won’t go through.  
(Assuming time after is only 23:00-00:00)

---

<div class="post-metadata">

### Author: ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)
#### Post date: [December 6, 2024, 10:18am UTC](https://community.homey.app/t/simple-motion-detector-flow-now-working-looking-for-guidance/122904/6 "2024-12-06T10:18:27Z")

</div>

> [@Kyle\_Michiels](#):
>
> Before sunrise would mean between 04:30 PM and 8:30 AM

Whatever you think it is, or what I think it is, or the developer thinks it is, one has to test it to be sure how it has been implemented.😀

---

<div class="post-metadata">

### Author: ![320\_Atlantic\_Avenue](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/320_atlantic_avenue/32/120757_2.png) [@320\_Atlantic\_Avenue](https://community.homey.app/u/320_Atlantic_Avenue)
#### Post date: [December 7, 2024, 5:26am UTC](https://community.homey.app/t/simple-motion-detector-flow-now-working-looking-for-guidance/122904/7 "2024-12-07T05:26:28Z")

</div>

Thank you everyone for your suggestions! I think I have found the solution, as well as understand more on how Homey works. It looks like that the cards are based per day, so when 12:00am hits, that’s the end of the card. So with this flow I needed to add an “OR” statement to also make up for the next day, as shown.

Thank you! Hope this helps others.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/c/5c6fa7d699432f61bbb5e95a1eeca5b7a1ec9712.png)
