Added configurable gap between temps, added Auto_AC_matrimoniale

This commit is contained in:
2026-06-27 18:57:15 +02:00
parent 40e85c10c0
commit 563614da00
2 changed files with 41 additions and 10 deletions
@@ -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: []