Recommended: threshold

This commit is contained in:
darthsandmann 2022-08-02 20:31:36 +02:00
parent 78259b2dc4
commit 34d1ad9367

View File

@ -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 %}
## -----------------------------------------------------------------------------------------------##