# Sunset vs dusk/twilight

Wouldn't twilight be a better time value to use in automations as this seems to reflect the real world outside conditions

1 Like

You can always add/subtract a time differential to compensate. I often use lux level as a better indicator.

4 Likes

Conceptually I would say yes, but I suspect what you are ultimately after is detection of light conditions, i.e. lux, rather than a specific time.

2 Likes

I would think it depends on what you have in mind for an automation. Do you mean for turning lights on when itβs getting dark outside?

Twilight gets complicated as there are civil, nautical and astronomical variations (6Β°, 12Β°, 18Β° below the horizon), and, to make things more interesting occur twice in a 24 hour period. Dusk, technically, has these same variations, but only occurs once in a 24 hour period (using the common definition). Sunset, on the other hand, only has 2 variations, actual and observed - observed trails the actual due to refraction (sunrise the observed occurs before the actual).

Having said this, there are a number of other variables that mean even the most precise calculations of the above can off by as much as 2 minutes. As for me, I just want the lights to come on when I need them - could go with lux, but the variations in how it has been implemented are staggering.

3 Likes

I expect my uneducated addition I was about to make is also captured in @thebearmay 's response, i.e. the time between dusk / twilight and sunset varies in the Summar compared to the Winter, plus a few other variables by the looks of things... So whilst I hit like on @jameslslate 's post, and it does have merit, you may still want to add in a few more pieces of logic if you choose to use it.

1 Like

Too many trips around the sun tends to pack a lot of useless trivia into the brain...

2 Likes

There are ways to counteract that....

1 Like

it was for operating my blinds, so close open and dawn/dusk, using lux < or > would cause a rule to run evey time the lux changed and my override a manual operation.
eg if i close them during the day, nothing will override them at the moment until sunrise the next day, or if the partly closed the will fully close at sunset. id like to use twilight like sunset etc

1 Like

I use lux to close my curtains in the evening.
I use a global boolean variable.
In a rule the boolean is set true or false depending on the lux level. I'm using 10.
Of course this gets evaluated when lux changes. (I have a restriction so that the rule is only evaluated when lux below 15).
I then use this boolean to close my curtains when the value is true.
Something like this may work for you.

BTW. My curtain rules are then paused when the curtains close until a pre-determined time the following morning when my curtain rules become active again.

1 Like

Could use the trigger as sunset then wait for lux 10

I tried to go the twilight route. I couldn't find a "sweet" spot (turning on lights) that worked throughout the year. Even forgetting DST. So I moved to Lux.

I found putting the sensor on the North facing side of the house was best as clouds did not have so much of an effect.

I have two versions to deal with small variations in lighting dithering the Lux reading:

1. Lights go on at < 20 lux. Then lux is disabled until 11:00 the next morning.

2. Lights go on at <20 lux. The lux is disabled until reaching > 1300.

In both cases the Lights go off either manually or at a specific time in the evening.

#1 works best for be because I have motion sensor controlled (non smart) that illuminate the back yard (North side of the house).

1 Like

Going to try this

I'm planning on doing something like this as well, both for blinds and transitioning my lighting levels / mode. I plan on using two new hue outdoor motion sensors to get a lux reading.

All my 3 windows are facing west.
But the way how sun moves I am using individual lux sensor