From 39767fd8a757a0700ee138c741567c4ca57f44cd Mon Sep 17 00:00:00 2001 From: "@TribuneX" Date: Thu, 4 Jul 2024 21:54:39 +0200 Subject: [PATCH] feat: add sensor for total garden water consumption --- includes/template.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/includes/template.yaml b/includes/template.yaml index e1df423..44698dd 100644 --- a/includes/template.yaml +++ b/includes/template.yaml @@ -21,3 +21,16 @@ {% endif %} # If you have issues with the history sensor doubling after restarting HA, add the line below (@BigG) availability: "{{ (states('sensor.rainsensor_flips') not in ('unknown', 'unavailable')) }}" + +- sensor: + - name: "Total Garden Water Consumption" + unique_id: watering_garden_total_amount + state: > + {{ (states('sensor.watering_rasen_amount') | float(2) + + states('sensor.watering_hecke_amount') | float(0) + + states('sensor.watering_rasen_klein_amount') | float(0) + + states('sensor.watering_blumenbeet_amount') | float(0)) + | round(2) }} + unit_of_measurement: "l" + device_class: water + state_class: total_increasing