67 lines
1.5 KiB
YAML
67 lines
1.5 KiB
YAML
blueprint:
|
|
name: climate_heat_save
|
|
description: Turn off climate (thermostat) because of open window
|
|
domain: automation
|
|
author: Tiziano Trabattoni
|
|
input:
|
|
window_sensor:
|
|
name: Window Status
|
|
description: Identifies the Window Sensor Device for Opened Status
|
|
selector:
|
|
entity:
|
|
filter:
|
|
- device_class: door
|
|
domain: binary_sensor
|
|
climate_target:
|
|
name: Termostat Control
|
|
description: Identifies the Thermostat climate to control
|
|
selector:
|
|
entity:
|
|
filter:
|
|
- domain: climate
|
|
|
|
ext_temp_limit:
|
|
name: Temperature range active
|
|
description: Identifies the temperature max that enable the saving
|
|
default: 18
|
|
selector:
|
|
number:
|
|
min: 0
|
|
max: 30
|
|
|
|
# binary_sensor.bagnoovest_finestra_contact
|
|
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: !input window_sensor
|
|
|
|
conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.esterno_temperature
|
|
below: !input ext_temp_limit
|
|
|
|
actions:
|
|
- if:
|
|
- condition: state
|
|
entity_id: !input window_sensor
|
|
state: "on"
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 10
|
|
then:
|
|
- action: climate.set_hvac_mode
|
|
metadata: {}
|
|
data:
|
|
hvac_mode: "off"
|
|
target:
|
|
entity_id: !input climate_target
|
|
else:
|
|
- action: climate.set_hvac_mode
|
|
metadata: {}
|
|
data:
|
|
hvac_mode: heat
|
|
target:
|
|
entity_id: !input climate_target
|
|
mode: single
|