Astro binding - How and where to edit to delay the sun set trigger?

Hi all,

I’ve been using the Astro binding for some time, and I must say I’m very happy with it. Especially during the last months, where the sun-set trigger turns on my outdoor lights, almost exactly when needed.

So, luckily we are going towards more “daytime” and I would like the sun-set-trigger to be executed 90 minutes later than the Astro binding tells, due to the geolocation I have.

How do I achieve that. I’ve tried to read some of the post in here, but I just can’t get it working.

Here is my rule that triggers a isDark switch, which then turns on my outdoor lights.

rule "It is dark on"
    Channel 'astro:sun:home:set#event' triggered START
     IsDark.state = ON

My Astro items:

//This is the Items file

DateTime Sunset_Time "Solnedgang [%1$tH:%1$tM]" <sun> (gAstro) {channel="astro:sun:home:set#start"}
DateTime Sunrise_Time "Solopgang [%1$tH:%1$tM]" <sun> (gAstro) {channel="astro:sun:home:rise#start"}

Anyone who could help me?

Thanks :).

Hi @hr3,

Yes I tried that, but I might have done it in the items file and not in the things file :O.

So please correct me if I’m wrong:

astro:sun:home [ geolocation="52.5200066,13.4049540,100", interval=300 ] {
        Type rangeEvent : set#event [

So the above should say - even though the set starts at “18:00” then I’ve added an offset that adds 90 minutes (when I want to delay it I shouldn’t use the “-” right?), so it will first start at “19:30”. But as we move on, and the default will be 20:33 then the “latest” will make sure that the astro is triggered no later than “20:00”?

This will only affect the set#event right? My rise will still follow whats default?

Use Timer Thread::sleep(x) vs timers in rules

Have you considered using the Dusk start/end channel.
I do this in England when the evenings are very long in the summer and we have light for a long time after the sunset.
You could switch from one trigger to another with the help of the Season channel



You can also use a light-sensor.

Yes I have considered a light sensor and I do also have the Xiaomi Aqara 2 sensors with built in LUX. The only thing with them, is that I need something to trigger them.

But so far - am I wrong with the offset=90 ? Is this only possible with a -90?

@vzorglub, sounds interesting. Can you show me the things / items that you use?

This is my dusk item:
DateTime duskEnd “dusk end [%1$tH:%1$tM]” (Astro)
Bound to the dusk end channel in the astro binding
There are several dusks… Civil, Nautical… Choose the one that suits you as the times are slightly different especially with the latitudes. There are good explanations on the net.
I don’t use the season channel (I use a summer time trigger created with node-red…)

But you could create another item:
String Season “Season [%s]” (Astro)
Linked to the season channel of the Astro Binding
and then a rule:

Not at home right now so pseudo code from memory
I can’t remember the syntax for channel triggers… :frowning:

(Pseudo Code)
Rule "Turn on lights in Winter"
When Astro:channel:sunset:end triggered
If (Season != “SUMMER”) {
Do whatever

Rule "Turn on lights in Summer"
When Astro:channel:dusk:end triggered
If (Season == “SUMMER”) {
Do whatever

Does that help?

Thanks - Much appreicated!