fix: height

This commit is contained in:
willem.serruys
2026-08-22 19:46:16 +02:00
parent a6d8b66b8a
commit 7bf479f90a

View File

@@ -61,7 +61,7 @@ template:
state_class: measurement
state: >
{% set mount_gap = 290 %} {# mm from sensor down to the "full" water line #}
{% set max_water_height = 2090 %} {# mm, tank depth from full line to bottom #}
{% set max_water_height = 1800 %} {# mm, tank depth from full line to bottom #}
{% set distance = states('sensor.regenput_sensor_distance') | float(0) %}
{% set height = max_water_height - (distance - mount_gap) %}
{{ [ [height, 0] | max, max_water_height] | min | round(1) }}