Template Sensor Logic fixes
This commit is contained in:
parent
ff50b2ecac
commit
f15ef84cce
@ -105,11 +105,11 @@ sensor:
|
|||||||
{% set temp_inside = states("sensor.temperature_kai_temperature")|float %}
|
{% set temp_inside = states("sensor.temperature_kai_temperature")|float %}
|
||||||
{% set temp_outside = states("sensor.temperature_outside_pirateweather")|float %}
|
{% set temp_outside = states("sensor.temperature_outside_pirateweather")|float %}
|
||||||
{% set inside_max = temp_inside + states("input_number.climate_temp_accuracy")|float %}
|
{% set inside_max = temp_inside + states("input_number.climate_temp_accuracy")|float %}
|
||||||
{% set inside_min = temp_inside - states("input_number.climate_temp_accuracy")|float %}
|
{% set accuracy = states("input_number.climate_temp_accuracy") |float %}
|
||||||
{% if temp_inside > target %}
|
{% if temp_inside >= target and temp_inside >= (temp_outside - accuracy) %}
|
||||||
{% if inside_max > temp_outside %} {{ "open window" }} {% endif %}
|
{{ "open window" }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if temp_inside < min %} {{ "close window" }} {% endif %}
|
{{ "close window" }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user