Design Pattern: Simple State Machine (e.g. Time Of Day)

Fair enough

Whats the purpose of this then on an item which has no binding channel?

Makes no sense to me to set meta data that set its time, to not carry across. I dont see the point of the entire post made by Rich when I could have easily just set the values to 1, persisted it for restore on startup. The whole metadata thing for this purpose only doesnt seem useful.

Anyway, ill add them to persistence.

Once that’s done the rule runs @rlkoshak but the times for Default_Night etc are incorrect, despite me having the correct Ephemeris.

Its currently 9.28pm (NIGHT) but this shows:


openhab> openhab:status Default_Night
2021-09-17T00:00:00.000+1000
openhab> openhab:status TimeOfDay
DAY
openhab>