-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
The device itself returns the total water delivered - would be nice to have a sensor which also shows how much water was delivered during the current/last watering session.
This is useful when manually controlling the valve to know how much water you have delivered.
I currently achieve this as follows:
input_text:
wfc01_last_water_delivered:
name: "WFC01 Last Water Delivered"
unit_of_measurement: "L"
icon: "mdi:water-outline"
template:
- sensor:
- name: "WFC01 Water Delivered"
icon: "mdi:water-outline"
unit_of_measurement: "L"
unique_id: wfc01_water_delivered
state: "{{ (states('sensor.wfc01_water_total') | float - states('input_text.wfc01_last_water_delivered') | float) | round(2) }}"
automation:
- alias: "WFC01 Update Last Water Delivered"
trigger:
- platform: state
entity_id: binary_sensor.wfc01_water_on
to: "on"
action:
- service: input_text.set_value
data:
entity_id: input_text.wfc01_last_water_delivered
value: "{{ states('sensor.wfc01_water_total') }}"
Metadata
Metadata
Assignees
Labels
No labels