The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
Light flows triggering only after the sun is down.
First of all my apologies, i know i've seen a flow screenshot somewere but after looking for 90+minutes i give up on finding it. (used google and the forum search) And since this is something i think everybody wants i do not understand why it's that hard to do.. or find info on it. (might be my problem)
The "issue" is that i do not understand the way i can trigger a flow using Sun Events or Data & time cards.
What do i want:
The scenario i want to create is that if it's starting to get dark outside the trigger 'light's on' flow in my Kitchen is triggered by a motion sensor. ( i do understand the Countdown app and will use that also afterwards but first i need to get my head around the darkness option)
What do i use:
KaKu motion sensor and KaKu lightswitch.
What do you managed:
Well it works, but the lights go on every moment of the day now.
Also i used the:
cards and it solves that it triggers during the day but after midnight or late / early in the morning it won't turn on the light anymore.
Thanks to @glijie
To get this working you need the following apps installed on Homey:
Now we going to set it all up:
STEP 1. we first going to setup the apps in the Settings / Instellingen section of the desktop app
Bottom left you click on 'Better Logic' and we going to add a variable so we have one that can be set True or False.
Since we are going to set a sunset trigger i named it like Glije did Sunset and choose the 'Boolean" Variable type and make sure to check the option 'on' below. (make sure all red lines are set). Now we going to add it by clicking the button 'Add variable' (blue line)
Bottom left we click on 'CountDown' and we going to add a timer for your flow name it simple with your location of the lights in it.
and ofcourse add it with the Add timer button (blue line)
STEP 2. we are now ready to make some flows.
Glije teached me here that we make 2 flows that can help us as a 'Sun down' or 'Sun Up' trigger in other flows as well.
This is my it's dark flow:
Set 1 Sun Events card on Begin Sunset and add a Better Logic card choose with the arrows the 'Set a variable' card and as name the boolean we made sunset and we want to set it on 'True'.
So everytime the sunset is triggered this flow sets the Boolean of Better logic to True.
We make the 2nd new flow, and add below your Sun Event and again the Better Logic card with Set a variable but make sure to set it on 'False'.
Now i choose End morning golden hour as my door is pointed north and the sun ends up all day on the back of the house.
this is the event times of Sun Events you can also choose for End Sunrise / Einde Zonsopgang
Sunevents trigger times (do notice these automaticly change each day to match the event)
STEP 3. now it's the fun part we going to make the light flow.
We going to make a new flow (licht locatie aan) were you add your motionsensor and lights. in the middle we set the Better Logic card 'is true' with the boolean 'Sunset'. Now on the right under the light we add a Countdown card that is set on 'Turn Hourglass around / Draai zandloper om' fill in the name of the timer we made in step 1 and behind it the number of seconds you want the timer run out (i prefer 60 some ppl 90 check whats best for you)
Now only 2 flows are left the ones that trigger what happends if the Hourglass timer / Zandloper ran out.
Make a new flow (zandloper aanwezig) and add a Countdown card with 'Hourglass empty / Zandloper leeg' and add the timer we add in Step 1. (licht aan locatie huis) add your motion sensor and make sure its set on the card that says 'The motionsensor is on / De bewegingsmelder is aan) add the countdown card Turn hourglass around / Draai zandloper om.
now we make the last flow (zandloper afwezig) and we set the first card the same the second card with the motionsensor we make sure we have the box top right checked / gevinked so it says 'the motionsensor is off / De bewegingsmelder is uit' and on the right the light switch with turn off / zet uit.
If all correct you should now have set the correct flows so you can have the lights turn on and off automaticly in rooms you do not spend much time. if the room you do this for occasionally has someone present for longer times you could think of using perhaps using something like this in it:
(drawback is everytime you enter the room he asks you if you want to keep the light turned on or not. if you give no response it will respond to whats happening in the initial flow.)