Hello everyone, I wanted to share a new rule that I implemented for my Ecobee thermostats. I do not use the presence sensors to control my schedule (our schedule is pretty rigid), so I wanted to be able to automatically prevent our thermostats from going into away mode during the week on public holidays, such as Memorial Day. Here is my solution.
First, I wrote a rule that switches sPublicHoliday to ON or OFF at midnight based on if/then statements. There are plenty of programming sites where the work has already been done.
Then, I use that switch in the following rule every time the âprogram.currentClimateRefâ item changes to âawayâ for any of my thermostats. If the current day is a public holiday and the thermostats are not in vacation mode (sOnVacation), the rule will set the climate back to âhome.â
rule "Set Home on Public Holiday"
when
Item tDiningRoomCurrentClimate changed to âawayâ or
Item tMBRCurrentClimate changed to âawayâ or
Item tKitchenCurrentClimate changed to "away"
then
if (sPublicHoliday.state == ON && sOnVacation.state != ON) {
logInfo(âHVAC Controllerâ, âSetting thermostats back to home because it is a public holiday, so youâre probably home.â)
if (tDiningRoomCurrentClimate.state == âawayâ) {
ecobeeSetHold(tDiningRoomCurrentClimate, null, null, âhomeâ, null, null, ânextTransitionâ, null)
}
if (tMBRCurrentClimate.state == "away") { ecobeeSetHold(tMBRCurrentClimate, null, null, "home", null, null, "nextTransition", null)
} if (tKitchenCurrentClimate.state == "away") { ecobeeSetHold(tKitchenCurrentClimate, null, null, "home", null, null, "nextTransition", null)
}
}
end