Hi everyone, i have an automation (you can learn more [here])that automatically runs my irrigation based on temperature and rain.
The last step of the automation is a message i get via the app to inform me that the plant were watered, is there any way to add in that notification for how long were they watered?
I saw that someone sets an input_datetime to the moment the automation starts (and i already implemented this), how can i use this in the notification?
If you have smarther solutions are well accepted!
Thanks in advance
You could use a history stats sensor to track hoe long it was on and include that in your message:
If the irrigation does not run across the midnight boundary you can use this for today:
start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: "{{ now() }}"
Or if it only runs once in the last 24 hours (including across the midnight boundary):
start: "{{ now() }}"
duration:
hours: 24
Thanks! Works perfectly