i have a problem using the data i collect with ha. i have an automation for irigation. it runs every two days. i also have a rain sensor that give me the amount of rain it rains per day.
i would like to turn on the irigation if the amount of rain from today + yesterday is below some threshold.
my problem is how to make that sum. i know the values are stored somewhere because i have a graph with these values. i just dont know how to access them.
It seems to me that you should look at history_stats sensor platform
Second thought: seems this integration does not fit your need. However may be you could have a number helper called yesterday that is set just before midnight to cumulative, then day after just before midnight sum up yesterday value and current value, take the decision that is wanted for irrigation and then replace yesterday value by the new current one. I hope I’m clear. This is ok until you do not need to go to much in the past. Otherwise digging into the history database shall be needed, I guess