Since we’re about to enter the dry season, I’d like to get an HA notification to water the garden if there hasn’t been (say) 10mm rain in the last week. The problem isn’t actually figuring out how to do it but figuring out which of the many, many options are the best fit: Add conditionals to a calendar, use one of several scheduling add-ons, plumb it together with Node Red, create template sensors for things like total rainfall and use them in an automation, …
Does anyone have any thoughts on the best way to do it? I’m not asking for someone to pre-write the YAML for me (unless you happen to have it already in use) but just pointers onto the right path. For now I’m thinking a template sensor:
- platform: statistics
name: "Rain last 7 days"
entity_id: sensor.weather_station_rain_mm
state_characteristic: total
max_age:
days: 7
and then maybe an automation:
automation watering:
- id: uniqueid__notify_watering
alias: Notify to water the garden
triggers:
- trigger: time
at: noon
conditions:
- condition: numeric_state
entity_id: sensor.rain_last_7_days
below: 10
actions:
- action: notify.notify
data:
title: Garden needs watering
message: Less than 10mm rain in the last week, water the garden.
Problem with this is that it’s going to complain every day when I’d like it to be resettable once I’ve watered, which implies there’s probably a better way to do it than this. Any suggestions?