My head is lost in other things right now, so I’ll circle back with more feedback. But one thing that stands out is that you should cancel your timers when you reload the script. Do this in a scriptUnloaded, which is a special function that the org.openhab.automation.script.ScriptEngineManagerImpl.java. There’s also scriptLoaded too. There are references to these in the docs. It will be added to a timer example, but it doesn’t fit well for the power management examples. Sometimes it makes sense to kill a timer when a script reloads and sometimes it’s better to let it keep running. In your ToD rule, I think they should be stopped.
I had already added a ToD example in the repo too. This supports both cron times and Channels. Instead of metadata, I used a dict in the configuration module, where users can modify the times of the changes. In my example, I call the Item Mode instead of vTimeOfDay, since you can have modes that are not times, like Party and Security. The rule includes functionality to forgo the automated changes when the mode has been changed to one of these. For example, when the mode is Party, there are special lighting levels. Otherwise, the lights would dim when Mode changed to Night.
I use Mode in this automation script.