Added Auto AC automation
This commit is contained in:
@@ -741,3 +741,19 @@
|
||||
data:
|
||||
fan_mode: Auto
|
||||
mode: single
|
||||
- id: '1782056533736'
|
||||
alias: Auto_AC_Mansarda
|
||||
description: ''
|
||||
use_blueprint:
|
||||
path: homeassistant/auto_ac_control.yaml
|
||||
input:
|
||||
temp_threshold: 28
|
||||
climate_target: climate.mansarda
|
||||
- id: '1782056620495'
|
||||
alias: Auto_AC_SoggiornoP1
|
||||
description: ''
|
||||
use_blueprint:
|
||||
path: homeassistant/auto_ac_control.yaml
|
||||
input:
|
||||
temp_threshold: 27
|
||||
climate_target: climate.soggiorno_1
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
blueprint:
|
||||
name: Auto AC Control
|
||||
description: Auto Turn on Air Conditioning
|
||||
domain: automation
|
||||
author: Tiziano Trabattoni
|
||||
input:
|
||||
temp_threshold:
|
||||
name: Temperature Threshold to switch AC on
|
||||
description: This threshold is the temperature above which AC must be switched on
|
||||
default: 29
|
||||
selector:
|
||||
number:
|
||||
min: 25
|
||||
max: 40
|
||||
unit_of_measurement: celsius
|
||||
|
||||
climate_target:
|
||||
name: Termostat Control
|
||||
description: Identifies the AC climate to be controlled
|
||||
selector:
|
||||
entity:
|
||||
filter:
|
||||
- domain: climate
|
||||
|
||||
mode: single
|
||||
|
||||
# Definiamo l'input come variabile per usarlo dentro i template dei trigger
|
||||
trigger_variables:
|
||||
target_temp: !input temp_threshold
|
||||
sensor_entity: !input climate_target
|
||||
|
||||
triggers:
|
||||
# Si attiva quando la temperatura attuale del clima sale SOPRA la soglia impostata
|
||||
- trigger: template
|
||||
value_template: "{{ state_attr(sensor_entity, 'current_temperature') | float(0) > target_temp | float(0) }}"
|
||||
id: AC_on
|
||||
# Si attiva quando la temperatura attuale del clima scende SOTTO la soglia meno 2 gradi
|
||||
- trigger: template
|
||||
value_template: "{{ state_attr(sensor_entity, 'current_temperature') | float(0) < (target_temp | float(0) - 2) }}"
|
||||
id: AC_off
|
||||
|
||||
conditions: []
|
||||
|
||||
actions:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id:
|
||||
- AC_on
|
||||
sequence:
|
||||
- action: climate.set_hvac_mode
|
||||
target:
|
||||
entity_id: !input climate_target
|
||||
data:
|
||||
hvac_mode: cool
|
||||
- action: climate.set_fan_mode
|
||||
target:
|
||||
entity_id: !input climate_target
|
||||
data:
|
||||
fan_mode: Auto
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id:
|
||||
- AC_off
|
||||
sequence:
|
||||
- action: climate.set_hvac_mode
|
||||
target:
|
||||
entity_id: !input climate_target
|
||||
data:
|
||||
hvac_mode: "off"
|
||||
- action: climate.set_fan_mode
|
||||
target:
|
||||
entity_id: !input climate_target
|
||||
data:
|
||||
fan_mode: Auto
|
||||
Reference in New Issue
Block a user