diff --git a/.github/tado_x-switch_climates_on_windows_state.yaml b/.github/tado_x-switch_climates_on_windows_state.yaml new file mode 100644 index 0000000..cbc94c1 --- /dev/null +++ b/.github/tado_x-switch_climates_on_windows_state.yaml @@ -0,0 +1,67 @@ +blueprint: + homeassistant: + min_version: 2024.10.0 + author: damru + domain: automation + name: Tado° X 🪟❄️🔥 Change climate mode when windows are opened/closed + description: | + ## Tado° X 🪟❄️🔥 Change climate mode when windows are opened/closed + + 🪟 Turn **off** ❄️ climate when one window is opened + + 🪟 Switch climate to **auto** 🔥 mode when **all windows** are closed + input: + window_sensors: + name: Window opening sensor(s) + description: 🪟 Binary sensor(s) to detect whether a window is opened or closed + selector: + entity: + filter: + - domain: binary_sensor + multiple: true + valves: + name: Climate(s) + description: ❄️🔥Climate device(s) to control + selector: + entity: + filter: + - domain: climate + multiple: true +mode: queued +triggers: + - trigger: state + entity_id: !input window_sensors + from: "off" + to: "on" + id: "opened" + - trigger: state + entity_id: !input window_sensors + from: "on" + to: "off" + id: "closed" +actions: + - choose: + - conditions: + - condition: trigger + id: "opened" + sequence: + - action: climate.turn_off + target: + entity_id: !input valves + - conditions: + - condition: trigger + id: "closed" + sequence: + - condition: template + value_template: >- + {{ states.binary_sensor + | selectattr("entity_id", "in", valves) + | selectattr("state", "eq", "off") + | list + | length == valves | length + }} + - action: climate.set_hvac_mode + target: + entity_id: !input valves + data: + hvac_mode: auto