Given that I now have to change the rules due to Joda datetime, I thought it might be a good opportunity to rethink how I do it.
A rule to trigger a certain amount of minutes after or before a sunset but have an absolute boundary.
Open 30 minutes before sunrise but not before 7am (Sunrise in UK is 04:45)
Close 30 minutes after sunset but at latest by 8pm (Sunset in UK is 21:30)
Existing way was to, every minute, check the minutes of day against the minutes since midnight for opening and closing times and if triggered, send command.
It’s a manual rule with lots of code and items. Anyone got an easier method?