From a6d8b66b8a74f3fc96263c96eaa6d712a790a9f7 Mon Sep 17 00:00:00 2001 From: "willem.serruys" Date: Sat, 22 Aug 2026 19:44:07 +0200 Subject: [PATCH] fix: sensor --- configurations/home-assistant/configuration.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configurations/home-assistant/configuration.yaml b/configurations/home-assistant/configuration.yaml index fa6e5dd..5a8bf3c 100644 --- a/configurations/home-assistant/configuration.yaml +++ b/configurations/home-assistant/configuration.yaml @@ -74,7 +74,7 @@ template: state: > {% set diameter = 1450 %} {# mm #} {% set radius = diameter / 2 %} - {% set height = states('sensor.regenput_sensor_distance') | float(0) %} + {% set height = states('sensor.cistern_water_height') | float(0) %} {% set volume_mm3 = 3.14159265 * (radius ** 2) * height %} {{ (volume_mm3 / 1000000) | round(1) }} {# convert mm³ to liters #} @@ -84,5 +84,5 @@ template: state_class: measurement state: > {% set sensor_offset = 2090 - 290 %} {# full tank height - sensor_mount #} - {% set height = states('sensor.regenput_sensor_distance') | float(0) %} + {% set height = states('sensor.cistern_water_height') | float(0) %} {{ (height / sensor_offset * 100) | round(1) }}