Persisting and restoring your “dark” Item covers many cases.
It relies on your openHAB not being out of service for long, as it simply “remembers” the last state of the Item at boot up time.
There is a risk that if you reboot when an event is due - sunset, say - then the restored will be wrong, and stay wrong, until sunrise.
The most complete solution is a rule that runs after boot up, triggered by System started
This can compare if “now” is before sunrise or after sunset, and set your “dark” Item.
To do that, you would need to set up further Items linked to Astro binding’s state channels. These would get populated with sunrise and sunset times for that day at boot up or each midnight.