I have a thermostat and a window sensor. I am getting trouble when the window is open and a setpoint should be changed. In this case the thermostat might activate the heater because it does not consider the opened window.
I control the thermostat heating schedule with several rules like:
when [its Monday or its Tuesday or its Wednesday or its Thursday or its Friday] and its 8:00 then set temp of heater_1 to 19.
Besides the schedule I lower the thermostat when the window is opened:
when contact_sensor_1 is opened then set $bedroomLastHeatingSetpoint = $danfoss_1.temperatureSetpoint and set temp of danfoss_1 to 8.
And I increase the thermostat to the last saved setpoint with:
when contact_sensor_1 is closed then set temp of danfoss_1 to $bedroomLastHeatingSetpoint.
Single rules for the cases “window open” and “window closed”.
when contact_sensor_1 is opened then set $bedroomLastHeatingSetpoint to 19
when contact_sensor_1 is closed then set temp of danfoss_1 to 19
BUT this increases the number of rules too much, especially with many thermostats and window sensors.
Do you have any other idea to solve it?