diff --git a/packages/climate/climate_sensors.yaml b/packages/climate/climate_sensors.yaml index 600d13a..6d53612 100644 --- a/packages/climate/climate_sensors.yaml +++ b/packages/climate/climate_sensors.yaml @@ -104,11 +104,14 @@ sensor: {% set target = states("sensor.climate_temp")|float %} {% set temp_inside = states("sensor.temperature_kai_temperature")|float %} {% set temp_outside = states("sensor.temperature_outside_pirateweather")|float %} - {% if temp_inside > max %} - {% if temp_inside > temp_outside %} {{ "open window" }} - {% else %} {{ "close window" }} {% endif %} + {% set inside_max = temp_inside + states("input_number.climate_temp_accuracy")|float %} + {% set inside_min = temp_inside - states("input_number.climate_temp_accuracy")|float %} + {% if temp_inside > target %} + {% if inside_max > temp_outside %} {{ "open window" }} {% endif %} + {% else %} + {% if temp_inside < min %} {{ "close window" }} {% endif %} {% endif %} - {% if temp_inside < min %} {{ "turn the heater on" }} {% endif %} + ## -----------------------------------------------------------------------------------------------##