fix: fill percentage

This commit is contained in:
willem.serruys
2026-08-22 19:21:50 +02:00
parent 40cad2ec70
commit b56b4912a2

View File

@@ -82,6 +82,6 @@ template:
unit_of_measurement: "%" unit_of_measurement: "%"
state_class: measurement state_class: measurement
state: > state: >
{% set sensor_offset = 290 %} {# same as above, = full tank height #} {% set sensor_offset = 2090 %} {# same as above, = full tank height #}
{% set height = states('sensor.cistern_water_height') | float(0) %} {% set height = states('sensor.cistern_water_height') | float(0) %}
{{ (height / sensor_offset * 100) | round(1) }} {{ (height / sensor_offset * 100) | round(1) }}