Skip to content

Commit

Permalink
feat: add sensor for total garden water consumption
Browse files Browse the repository at this point in the history
  • Loading branch information
TribuneX committed Jul 4, 2024
1 parent 0307e82 commit 39767fd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions includes/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 39767fd

Please sign in to comment.