fix: sensor_offset
This commit is contained in:
@@ -60,7 +60,7 @@ template:
|
||||
unit_of_measurement: "mm"
|
||||
state_class: measurement
|
||||
state: >
|
||||
{% set sensor_offset = 290 %} {# distance (mm) from sensor to tank bottom #}
|
||||
{% set sensor_offset = 2090 %} {# distance (mm) from sensor to tank bottom #}
|
||||
{% set distance = states('sensor.regenput_sensor_distance') | float(0) %}
|
||||
{% set height = sensor_offset - distance %}
|
||||
{{ [ [height, 0] | max, sensor_offset] | min | round(1) }}
|
||||
|
||||
Reference in New Issue
Block a user