What could be done is a custom capability that emits a value at sunrise and another at sunset.
To make it usable with positive and negative offsets, something else would have to be added, perhaps two capabilities with +/- time refence to sunset and sunrise emitted every minute.