Thermostat rules with manual override timeout

Have you considered applying Design Pattern: Time Of Day? Keep in mind that the example there is just for reference and can be and is intended to be expanded to include days of the week and such. That could replace the cron triggered Rules and potentially give you something more flexible that could be expanded where you can, for example, define the times based on a calendar.

Also look at Design Pattern: Associated Items for a way to make the temps for each time period stored in Items that can then be adjusted from the sitemap instead of having to hard code them.

I use a similar approach in my lighting. During the day, the lights will come on when it’s cloudy. But if a user turns on or off a light during this time, that light will keep that state and no longer change based on cloudiness. The light then becomes automated again when the next time period comes along. This kind of approach where the override lasts until the next time period would vastly simplify these Rules as you would no longer need timers at all.

I’ve moved this to the Tutorials and Examples Solutions category as it’s more appropriate.