If I would like to 1) check every day at 20:00 (irrigation after dark, but to be decided when I’m still awake), what the 2) total rain was for the last 5 days. Preferably not by using an automation but by some sort of statistics sensor?
Personally, I look at yesterdays rain by storing the value in a helper just before midnight, then use that to vary the amount of time the sprinkler is on the next day. The compensation Integration calculates the number based on my parameters.
This is the 3 chunks of code for that:
Hmmm… I have to come back on this, because it isn’t functioning like I expected.
This statistics sensor works perfectly with my Netatmo rain sensor, but apparently the Buienradar 24h sensor behaves differently.
The Netatmo sensor counts the total precipitation for the current day, and this value is reset at 00:00 every day:
I did expect that only the values going up would be counted (nonnegative), but apparently it doesn’t work like that.
Perhaps it is possible to use the Buienradar sensor “Rain 1d” with a statistics sensor like this?
Anyhow, it of course is better to use real measured precipitation values, like with a Netatmo sensor, and not use predicted values like the Buienradar sensors.