fix: sensor
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user