The 2022.11 release of Home Assistant added the option to track water usage in the Home Assistant Energy dashboard. (Integrating your water usage - Home Assistant)The ESPhome configuration has been updated to support this feature. (Build a cheap water usage sensor using ESPhome and a proximity sensor - PieterBrinkman.com)
What have been done is just the reading of the water meter. Good but insufficient .
Water is a far bigger subject, I said that because I spent my life in Paris or London, and jut move in Deep South Italian country side where water is just “life”. Water is about artesian well (Pozzo), water tank (cisterno), irrigation… but also leak detection, reduce shower time automation, hot water consumption, boiler efficency (energy used/water consumed & thermal loss) etc…
So we have to mesure the amount in pipes and tanks to manage refill pump.
I found a good solution for water tank, I am happy to share with you based on shelly uni and water pressure sensor plugged at the bottom.
(Turn on auto translate caption) تجربة حساس مستوى الماء مع شيلي يوني - wire shelly uni to water level sensor - YouTube
For the sensor pay attention to pick the right one https://de.aliexpress.com/item/1005002355626150.html?spm=a2g0x.12057483.top.2.304cd3a3zBiTcS
Now water flowing into the pipe is the big deal, if only we could find out how much water is going through for a reasonable cost. Having look for some time I found some pipe connector equip with Hall effects sensor, many references for different pipe sections but interestingly somebody on the net was saying they all use the same sensor. Very interesting as one solution could fit all (many) !
Google search: Thread+Brass+Water+Flow+Switch
Hall effect sensor are managable by ESP board, just need to find out basic electronic schematic to connect all together. Unfortunately that skill is now gone 45 years after my Uni, need some help here to avoid magic smoke.
I would love to interest somebody to write an article / tutorial on that subject.