I am trying to create an automation for an alarm when water consumption has increased by X in the last X minutes.
Unfortunately, I do not know how to build the condition here.
Already tried a derivative sensor without luck.
A “watercounter” gets an increment for every 10 liters of water.
The water consumption is not permanently on. But only when flowers etc. are watered.
It has already been forgotten several times to switch the water off again. I would therefore like to continuously check whether the water consumption has been higher than 50 liters in the last hour.
So if 5 increments occur on "watercounter in less than 60 mins.
Watercounter is a counter sensor. In detail a Reed contact is connected to the waterclock and to a Shelly 4i. An impuls is send every 10 liters by the reed contact.
In that case I would use the reed contact (binary_sensor ?) with a history stats sensor. History Stats - Home Assistant
This should report a number of times it has gone on in the past predefined time.
Hmm… I’m a bit helpless with this topic and unfortunately I can’t really get any further.
I have now created a History_Stats sensor that logs how often the reed contact triggers at 00:00 for 24 hours.
But this should actually be reset every hour and start counting again.
If the count in the hour then goes above the value X, the automation should trigger.