Use the astro binding.
Configure the range event for sunset:
Then create an offset time for that event by using the configure channel.
Then create a rule to trigger at the event started for the set#event
Set the START or END of the event trigger otherwise the rule will fire twice (START and END)
If you wanted to use the range event for civil dusk you just do the same as above but instead of sunset event range you use the civil dusk event range.