Hey everybody,
I have a flat and want to automate my heating depending on open windows and doors. I want to shut off the heating if
1.) the window in that room is open or
2.) it is conencted to a room with an open window via open doors.
Pretty simple I thought, as I have a corridor (“F”) that connects to every single room (living room “WZ”, bathroom “B” and sleeping room “SZ”) with one sensored door. There are no other co9nnections between the rooms. So my plan is as follows:
1.) put Aqara window/dor sensoprs to every window and door. The living room has 2 windows, so those are aggregated into a single entity that will become “open” as soon as one of the windows is “open”.
The bathroom has no window, so I will just activate the heating state via a logical and of the corridor ventilation state and the door opening state.
2.) for every room, create a template sensor that will control the “ventilating” status for that room in dependency of its windows, the door to the corridor and the corridor ventilation state:
{% set door = (states('binary_sensor.s_door_wz_contact')) == "on" %}
{% set window = (states('binary_sensor.g_window_wz') == "on") %}
{% set flur = (states('binary_sensor.t_ventilation_f')) == "on" %}
{{ (window) or (door and flur) }}
(this is for the living room with 2 windows; for the rest, the value is retrieved just as in the “door” variable with a single sensor)
3.) create a similar template for the corridor that sets the corridor’s ventilating status to a logical or of all the single rooms’ ventilation status:
{% set sz = (states('binary_sensor.t_ventilation_sz')) == "on" %}
{% set wz = (states('binary_sensor.t_ventilation_wz')) == "on" %}
{% set k = (states('binary_sensor.t_ventilation_k')) == "on" %}
{{ ((wz) or (sz)) or (k) }}
However, once I open up a room’s door to the corridor and that changes the value there, it won’t change back. Is that because of some type of safety mechanism preventing infinite loops or similar? Do you have a better idea of implementing that? Thank you very much in advance ![]()
best wishes,
Nico