Water flow rate for fountain

I have two fountains and each one needs to be refilled at least once a day. I thought that it would be good if I could put a flow meter on the PVC pipe in the fountain. If I could detect when the flow rate dropped to a certain point that would tell me that I need to activate a water valve to add water to the fountain. Once the flow rate got back up I could turn off the valve. I have yet to find an obvious device choice for this. For me, I need the device to be not much bigger than the PVC pipe it connects to (3/4" or 1"). And since it would be mounted inside the fountain battery power would not be an option.

Any ideas?

There are several different ideas for filling a fountain is this topic (fixed)

That link didn't work for me.

sorry about that

If your willing to tinker/diy you could use a nodemcu running Tasmota with one of these style of water flow sensors. The data can be brought into HE with Gary's Tasmota Sync drivers.

It outputs pulses which the rate of pulses/minute/second can be counted by Tasmota and then sent to HE for determination.

I think Dan's Hubduino firmware for nodemcu's supports pulse counting but couldn't find a reference. You might want to post on his thread if you want and this idea is of interest.

Here's a couple of examples (not HE specific though).

https://how2electronics.com/iot-water-flow-meter-using-esp8266-water-flow-sensor/

https://iotdesignpro.com/projects/iot-based-water-flow-meter