fix: sensor

This commit is contained in:
willem.serruys
2026-08-22 19:16:58 +02:00
parent 2961b477b4
commit 6b0d12d6d2

View File

@@ -75,7 +75,7 @@ template:
{% set radius = diameter / 2 %} {% set radius = diameter / 2 %}
{% set height = states('sensor.cistern_water_height') | float(0) %} {% set height = states('sensor.cistern_water_height') | float(0) %}
{% set volume_mm3 = 3.14159265 * (radius ** 2) * height %} {% set volume_mm3 = 3.14159265 * (radius ** 2) * height %}
{{ (volume_cm3 / 1000000) | round(1) }} {# convert mm³ to liters #} {{ (volume_mm3 / 1000000) | round(1) }} {# convert mm³ to liters #}
- name: "Cistern Fill Percentage" - name: "Cistern Fill Percentage"
unique_id: cistern_fill_percentage unique_id: cistern_fill_percentage