Close to shutters after civil sunset

Tags: #<Tag:0x00007f616db1e5d8> #<Tag:0x00007f616db1e4c0> #<Tag:0x00007f616db1e3f8>

Hi Guys,
after a long search and try. I try it here.

I would like to shut down the shutters when the sun goes down (-30 minutes).

So far I’m looking for the Internet …

rule "Rollläden herunterfahren"
when
    Channel 'astro:sun:local:civilDusk#end' triggered START or
    Time cron "0 0 22 * * ?"
then
        sendCommand(gRLGesamt, DOWN)
end

I see the problem with the 1st rule triggering.
Because at 22 o’clock it works like it should not only when the time is reached by the sunset.
What do I have to change that works?

You need to trigger on the Range Event channel.

… and don’t forget to add your offset to that channel, too :sunglasses:

can you write me the finished code here?

Just change #end to #event.

1 Like

Thank you.