Added configurable gap between temps, added Auto_AC_matrimoniale
This commit is contained in:
@@ -14,6 +14,16 @@ blueprint:
|
||||
max: 40
|
||||
unit_of_measurement: celsius
|
||||
|
||||
temp_hist:
|
||||
name: Temperature Threshold to switch AC on
|
||||
description: This gap is difference between on and off
|
||||
default: 2
|
||||
selector:
|
||||
number:
|
||||
min: 1
|
||||
max: 3
|
||||
unit_of_measurement: celsius
|
||||
|
||||
climate_target:
|
||||
name: Termostat Control
|
||||
description: Identifies the AC climate to be controlled
|
||||
@@ -27,16 +37,17 @@ mode: single
|
||||
# Definiamo l'input come variabile per usarlo dentro i template dei trigger
|
||||
trigger_variables:
|
||||
target_temp: !input temp_threshold
|
||||
target_hist: !input temp_hist
|
||||
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) }}"
|
||||
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) }}"
|
||||
value_template: "{{ state_attr(sensor_entity, 'current_temperature') | float(0) < (target_temp | float(0) - temp_hist ) }}"
|
||||
id: AC_off
|
||||
|
||||
conditions: []
|
||||
|
||||
Reference in New Issue
Block a user