Files
ha-blueprints/.github/tado_x-switch_climates_on_windows_state.yaml

68 lines
1.8 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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