Can somebody give me a hand how to write rules which are based on astro data?
Astrobinding have already all needed items, but how you are using them?
eg. I wanted some action 20mins BEFORE dusk, or xy mins before/after dawn.
No, you can’t.
You can set up an Astro event thing that triggers 20 mins before dusk and trigger a rule from that.
Or you can link an Astro channel to a DateTime Item and examine that in a rule anytime you like, to see if dusk - 20 mins > now.
You can do something like this (and do some calculation within the following <...>) to achieve what you want where <latitude> and <longitude> are the values for your geolocation:
Then you can use the triggers as described (see channels in the binding documentation):
rule "action 20mins BEFORE dusk"
when
Channel 'astro:sun:minus20:civilDusk#event' triggered START
then
logInfo("astro.rules", "It is 20 minutes before civil dusk now!")
end