But I would like to only have the light go on when its really DARK!
So I was hoping to delay it for 1-2 hours after sunset
I think below horizon in the morning is okay?
So is this possible using the UI? or id the correct way to include a offset like this?
So how to translate this into 1 hour or 1,5 hours?
I you using some calculator? - not exactly as easy as defining a offset after sunset
But again I like using the UI so I will try to use the elevation instead (Rock solid is the key word here! LOL)
I dont remember exactly what I did here, it’s been so long, but in short:
Set the right timezone and elevation setting in config/core (you’ll have to figure out how to get your exact elevation )
Figure out at the trip point. In my case, I use a template {{ state_attr('sun.sun','elevation') < -2.5 }} The -2.5 value here is my trip point. I want my lights on shortly after the sun sets, but not too early.
I do remember running some sensors before I settled on 2.5 to see where the sun was at which time of the day after sunset. Can probably be calculated more elegantly, but this is how it worked for me.
Yes but you would get that anyway if using the sun goes down wouldn’t you?
I think I have found a way to just adjust the time before and after the sun goes down…
Not verified will have to test this tonight should produce the same results as elevation
condition:
conditions:
#Condition beginning 60 min after sunset (and including after sunset): https://home-assistant.io/docs/scripts/conditions/#sun-condition
- condition: sun
after: sunset
after_offset: "+1:00:00"
#Condition ending 30 min after sunrise (and including before sunrise)
- condition: sun
before: sunrise
before_offset: "-0:30:00"
@Tinkerer Sorry I don’t understand your comment I want this to change my condition is that’s it dark outside and that will change from month to month? (Or am I missing something )
Or maybe just bite the bullet and buy a LUX sensor…(Would still need to define the range, if it was cloudy during the day though)
Naturally you can base light automations on the sun. But in practical life, two days where one is a blue sky day and the next is a rainy day with heavy cloud cover will be two very different things when it comes to daylight. It easily makes a difference of more than an hour.
I recommend also using a light sensor. For example an Aeotec multisensor, or an Philips Hue motion sensor which also has a light sensor.
I use the same Philips outdoor motion sensor to turn on the outdoor patio light when it is dark and there is motion and same light sensor is used to turn on the light inside when it gets dark.
I have tried using just the sun but unless you live in a desert where it never rains, there is just too much variation from day to day based on cloud cover.
Lux sensor is the best, but the problem of using a time offset is that half an hour before/after sunset or sunrise is a very different light level on the shortest day than on the longest day.
However, -3 degrees is (ignoring cloud cover) pretty consistent across the year.