i have outdoor lamp that i need to switch on all night using astro
from lets say “astro:sun:34b0b0b2:set#end”
unitl “astro:sun:34b0b0b2:nauticDawn#start”
how do i create it?
At first you have to install the astrology binding. It will create the things you need.
At second you should use `item.sendCommand’ instead of ‘item.postUpdate’.
When the system starts, the it calculates the positions. Maybe it needs one cycle to work properly this can be handled by extension of your rules, but see it as the next step.
Note that your rules are for the astro1 binding. If you are on openHAB2, you should use the astro2 binding.
The trigger is completely different in astro2, please have a look at the official docs:
If that is your complete rule you don’t need any imports.
In general: you can delete every import starting with org.openhab.*
Because the channel triggers from the astro2 events are only a short trigger (ON, then immediately OFF again) I would recommend to use the design pattern for more flexibility: