Homey Community Forum

Date and Time - Before Sunset

Hi
I’d like to crete a flow that says something like
When - “45 minutes before sunset”
Action - “Turn on that light”.
Is this possible?
Thanks
Kaj

sunset-45
This should work, methinks…

1 Like

And also with the build in time cards:

Thank you Bjorn_Andersson
I don’t have that option in the When’s though.
Do I need to add a feature or something like that?

Thank you Rocodamelshe.
Is that to be read as, when it is 45 minutes to sunset?
I thought it meant, when the sun sets, wait 45 minutes?

It’s an app called “Sun Events” that you download as any other app. It has more states, like “golden hour” etc.

1 Like

Ahhhh, ok, thank you. Still familiarising with the system.
Thanks, I think it is what i am looking for.

That will be correct. And this card is not from an app u have to download, it’s a standard card already build in .

1 Like

Is there an easy way to have that card but after sunset? Using delay in the {then} card is ok if you have one or two actions but if I make a flow with lights that have brightness, color, temp etc. it would be more convenient to have it in the {when} card imo.
I would like to use the built in cards as much as possible.

Split it in two flows, SunSet Trigger - Delay: Trigger a Flow2 …
The other flow can have all objects… makes it imho easier to manage… and no extra App!

1 Like

Of course. Did not think of that. :slight_smile:

Thanks a lot!

For some reason this card is only in the when section available, and not in the AND section of the flow. Does any one know the reason?

I want to use this in combination with a lux sensor. But I do not want the lights to go on, when there is a havey rain on the day time. But if i am forced to use the sunset card only in the when rule, than the rule does not get triggered by the lux sensor.
So how could I best use this combination to achieve:

  • if lux sensor alarms on low light AND time is 45 minutes before sunset, then turn lights on.

U need another way of thinking. Today the sun sets at 21:50. So ur flow says when lux is low AND it is 21:05 THEN turn on the lights. This will never happen and is not the good way to go. Not saying this is easy because the light/darkness and the sunset is different every day. I want the lights to go on when it’s getting dark, not when the sun goes down. So I have a flow that starts at 1600 and checks every 15 minutes if the sensor is on. When it’s on I put on the lights and disable the flow.
It’s not perfect but it comes close. U cannot get it perfect, just try something u like the most.

I use my solar panels as light detector. When solar power is very low > switch on lights. The power is checked every 10s, so response is fast. Only problem is that the solar power output not only depends on light, but also on temperature. So when it is very cold, the light switches on later then when it is warm.

Like @Dijker mentioned, splitting up flows makes it easier to manage and understand. (Many flows is not bad!)
So in this case I would suggest create a flow that enables the other flow at sunset. This way it will not trigger when its raining.
(Make sure to also disable the flow at some time otherwise it only works one day…)