Use Arduino to estimate current status from previous learning

I have a arduino nano esp32 connected to a flow meter in order to check the water flowing in my house plant.
I would like to make Arduino record the usual quantity of water I use during the day and to understand if there is any possible leakage.
For example, if I usually use 5 liters of water in the morning and 10 liters during the evening, it should send me an alarm if it detects 8 liters of water during the morning.
I was thinking about a kalman filter, but i do not think it should be useful in this case.

I would like to make Arduino learns my usual habits and then make some a guess about the current situation.

How can I implement this?

Thank you

If you can work out the statistics of the problem, we could help translate it to code.

At its simplest, maintain an average of morning volume and evening volume every day, by incrementing the total number of daily observations, and performing a simple division. Your tests can then be made against those averages. For example testing if today’s exceeds a specified percentage.

On hackster there is an interesting idea for identifying/measuring power consumptions