# Flow question

**URL:** <https://community.homey.app/t/flow-question/51207>\
**Category:** Flows\
**Created:** [September 6, 2021, 7:37pm UTC](https://community.homey.app/t/flow-question/51207 "2021-09-06T19:37:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hyeung](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hyeung/32/41223_2.png) [@hyeung](https://community.homey.app/u/hyeung)\
**Post date:** [September 6, 2021, 7:37pm UTC](https://community.homey.app/t/flow-question/51207/1 "2021-09-06T19:37:05Z")

</div>

Hi,

I have the following flow, but it doesnt trigger?  
Basically when the sensor lux is \< 20 and that the time is after sunset, i want to turn on the lights. simples huH?  
Right now its 20:36 (after sunset being around 19:57), and the sensor lux is now reading 0lux.  
Any ideas…

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

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 6, 2021, 7:49pm UTC](https://community.homey.app/t/flow-question/51207/2 "2021-09-06T19:49:40Z")

</div>

Pobably it was before sunset, when the lux value went under 20.

I would suggest:  
Remove  
AND it’s after sunset.

Add  
AND time is after 15:00hrs  
AND time is before 23:59hrs

This way the “evening lights” triggers only during that timeframe.  
Make sure the lux value at 15:00hrs is always above 20lx or adjust the lux threshold.

---

<div class="post-metadata">

**Author:** ![hyeung](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hyeung/32/41223_2.png) [@hyeung](https://community.homey.app/u/hyeung)\
**Post date:** [September 6, 2021, 8:02pm UTC](https://community.homey.app/t/flow-question/51207/3 "2021-09-06T20:02:04Z")

</div>

thanks will give that a try

---

<div class="post-metadata">

**Author:** ![Edwin\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_d/32/136417_2.png) [@Edwin\_D](https://community.homey.app/u/Edwin_D)\
**Post date:** [September 6, 2021, 8:20pm UTC](https://community.homey.app/t/flow-question/51207/4 "2021-09-06T20:20:41Z")

</div>

Or add another flow: When the sun sets, and the lux is \<20, turn on the lights.

But why do you want to test for sunset anyway: If it’s too dark before sunset, why wouldn’t you want to turn the lights on too?

---

<div class="post-metadata">

**Author:** ![Marco\_Dijkstra](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marco_dijkstra/32/16541_2.png) [@Marco\_Dijkstra](https://community.homey.app/u/Marco_Dijkstra)\
**Post date:** [September 7, 2021, 3:45am UTC](https://community.homey.app/t/flow-question/51207/5 "2021-09-07T03:45:56Z")

</div>

I do have the same Peter\_Kawa suggested, the reason why? I have an other setting mode in the morning.

---

<div class="post-metadata">

**Author:** ![Chris\_nl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/chris_nl/32/27194_2.png) [@Chris\_nl](https://community.homey.app/u/Chris_nl)\
**Post date:** [September 7, 2021, 4:07am UTC](https://community.homey.app/t/flow-question/51207/6 "2021-09-07T04:07:27Z")

</div>

![Knipsel](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/f/8fd519f8ca62aaa8f272fc2332aee6396db8d83e.jpeg)

I use a flow like this, since that will trigger every time the lux changes, then see if the conditions match. So even when it is \<20 lux before sunset it will still trigger again after sunset (when the lux sensor updates, depends on which sensor you use when that is and when it’s not already 0 before sunset 😉 ).

---

<div class="post-metadata">

**Author:** ![Edwin\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_d/32/136417_2.png) [@Edwin\_D](https://community.homey.app/u/Edwin_D)\
**Post date:** [September 7, 2021, 5:36am UTC](https://community.homey.app/t/flow-question/51207/7 "2021-09-07T05:36:11Z")

</div>

If you want to prevent the above flow from triggering too much, you can disable the flow when it runs, and make another flow that enables it again in the morning.

---

<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:** [September 7, 2021, 8:41pm UTC](https://community.homey.app/t/flow-question/51207/8 "2021-09-07T20:41:07Z")

</div>

> [@hyeung](#):
>
> I have the following flow, but it doesnt trigger?

Does it not trigger?  
Or does it not execute the then? (Because the AND condition was not met.)

For troubleshooting things like this the “[papertrails app”](https://homey.app/nl-nl/app/nu.dijker.papertrails/PaperTrails-Logboek/) is great.  
By adding logging cards you can see if your flow was triggered and how it executed (was the AND condition met!, did it trigger the ELSE)
