# Beginners question

**URL:** <https://community.homey.app/t/beginners-question/98190>\
**Category:** Questions & Help\
**Tags:** advancedflow\
**Created:** [December 17, 2023, 9:20pm UTC](https://community.homey.app/t/beginners-question/98190 "2023-12-17T21:20:35Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![vincentdenkspel](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vincentdenkspel/32/82856_2.png) [@vincentdenkspel](https://community.homey.app/u/vincentdenkspel)\
**Post date:** [December 17, 2023, 9:20pm UTC](https://community.homey.app/t/beginners-question/98190/1 "2023-12-17T21:20:35Z")

</div>

Hi,  
I want to create a advanced flow that will do:  
If after sunset AND before a certain time THAN do this ELSE do that

My problem is that ‘after sunset’ is not listed in the IF cards but only in the AND cards.  
Does anybody know how i can handle this ?  
Thank you for your help

---

<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 17, 2023, 9:29pm UTC](https://community.homey.app/t/beginners-question/98190/2 "2023-12-17T21:29:51Z")

</div>

> [@vincentdenkspel](#):
>
> If after sunset AND before a certain time

When do you think this flow will trigger? Somewhere random between sunset and that certain time?

---

<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:** [December 18, 2023, 12:51am UTC](https://community.homey.app/t/beginners-question/98190/3 "2023-12-18T00:51:54Z")

</div>

My guess he means “when the sun sets”, but just a wild guess

I’ve these flows to act at sunset but before a certain time

Act at a certain time, only when it’s after sunset:

---

<div class="post-metadata">

**Author:** ![vincentdenkspel](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vincentdenkspel/32/82856_2.png) [@vincentdenkspel](https://community.homey.app/u/vincentdenkspel)\
**Post date:** [December 18, 2023, 6:21am UTC](https://community.homey.app/t/beginners-question/98190/4 "2023-12-18T06:21:51Z")

</div>

You’re right. As i said: i’m a beginner 🙂

---

<div class="post-metadata">

**Author:** ![vincentdenkspel](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vincentdenkspel/32/82856_2.png) [@vincentdenkspel](https://community.homey.app/u/vincentdenkspel)\
**Post date:** [December 18, 2023, 6:30am UTC](https://community.homey.app/t/beginners-question/98190/5 "2023-12-18T06:30:13Z")

</div>

Thank you for taking the time to answer.  
I wanted to create a simple scene but i have a habit of making things over complicated 😄  
The lights in the garden must go on at sunset and turn of a a a specific time.  
From there i will build it further with conditions like IF [after sunset] AND [lights are of] AND [motion detected] THAN [turn lights on].  
Thanks

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [December 18, 2023, 3:21pm UTC](https://community.homey.app/t/beginners-question/98190/6 "2023-12-18T15:21:17Z")

</div>

This…

> [@vincentdenkspel](#):
>
> The lights in the garden must go on at sunset and turn of a a a specific time.

…and that…

> [@vincentdenkspel](#):
>
> From there i will build it further with conditions like IF [after sunset] AND [lights are of] AND [motion detected] THAN [turn lights on].

…are two different processes, and that last one will not work this way.

Maybe you explain exactly what you want to do.

---

<div class="post-metadata">

**Author:** ![PeterHa](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@PeterHa](https://community.homey.app/u/PeterHa)\
**Post date:** [December 18, 2023, 10:09pm UTC](https://community.homey.app/t/beginners-question/98190/7 "2023-12-18T22:09:13Z")

</div>

Hi @vincentdenkspel, are you looking for something like that?

 ![Screenshot 2023-12-18 225757](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/6/1676adf86314af68b28d7883035a91df6b4e3d78.jpeg)

As Fantross said, it would be good to describe you needs with more details.  
Start with a simple setup, and then you will find here support to make it more detailed.

---

<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:** [December 19, 2023, 6:51am UTC](https://community.homey.app/t/beginners-question/98190/8 "2023-12-19T06:51:47Z")

</div>

Hello @Warmduscher and @vincentdenkspel ,

Warmduscher, your example flow is exactly what Vincent wrote here

> [@vincentdenkspel](#):
>
> IF [after sunset] AND [lights are of] AND [motion detected] THAN [turn lights on].

nothing wrong with converting words into an example flow, BUT

Flows work a bit different:  
this flow _might_ only trigger once a day, but only when the motion alarm is on, at exactly the same time when the sun sets.

You really want to flip those 2 cards, like:  
When  
-the motion alarm is on _(this is the event)_  
And  
-Bad Nachtlicht is off _(this is a condition)_  
And  
-it is night _(this is another condition)_  
Then  
-turn Bad Nachtlicht on

Note1: The ‘it is night’ card is the ‘it is day’ card, but inverted  
Note2: When you use ‘it is after sunset’ instead, the condition is no longer true after midnight, when the new day starts.

---

<div class="post-metadata">

**Author:** ![vincentdenkspel](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vincentdenkspel/32/82856_2.png) [@vincentdenkspel](https://community.homey.app/u/vincentdenkspel)\
**Post date:** [December 19, 2023, 8:09am UTC](https://community.homey.app/t/beginners-question/98190/9 "2023-12-19T08:09:12Z")

</div>

> [@DirkG](#):
>
> Maybe you explain exactly what you want to do.

Hi,

First of all I want to thank everybody trying to help me.  
What I need is the following:  
The gardenlights must turn on at sunset and turn op at a specific time (lets say 22:30).  
After 22:30 till sunset the lights must turn on for 5 minutes if motion is detected by the outdoor motion sensor.

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [December 19, 2023, 8:36am UTC](https://community.homey.app/t/beginners-question/98190/10 "2023-12-19T08:36:28Z")

</div>

Ok, now it’s clear.  
I guess the first part (turn on at sunset and turn off at 22:30) it’s easy. If not, please let us know.

The 2nd part could look like this:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/9/89745d67883c7f5e0bbe3cce2bfc1845b05e946b.png)

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

However, these two flows only work if the outdoor motion sensor is the only sensor that can activate/deactivate the zone (garden).  
If there are other sensors in the garden that should not influence these flows, then you need to create these flows with a timer app, e.g. Chronograph.

---

<div class="post-metadata">

**Author:** ![PeterHa](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@PeterHa](https://community.homey.app/u/PeterHa)\
**Post date:** [December 19, 2023, 11:46am UTC](https://community.homey.app/t/beginners-question/98190/11 "2023-12-19T11:46:45Z")

</div>

@DirkG : Great to see how zones will be used, I havn’t look into that, but I should.

Is it correct to use each time “Light is on” in the AND-card? I think it should be “Light is off” in the first flow.

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [December 19, 2023, 12:50pm UTC](https://community.homey.app/t/beginners-question/98190/12 "2023-12-19T12:50:47Z")

</div>

> [@PeterHa](#):
>
> Is it correct to use each time “Light is on” in the AND-card?

Yes, because:

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

But it’s also possible to invert the flow card (right mouse button). In this case, the blue link/line should be used:

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

However, I skip the additional step of inverting the flow card.
