The valve is Zigbee and there is a system driver for it. As for the flow sensor, it's a hall effect sensor mounted on a little turbine installed inline with the valve, with the sensor lead plugging directly into it. The valve driver supports it directly.
For sure the likelihood of a simultaneous power outage and water leak must be generally low.
However the batteries are useful for the general case of a power outage during which one wishes to operate the valve for any reason (such as leaving the house for several days).
OR you (we... I am in SoCal also) could make up a vibration sensor that would trigger a rule to close the valve.
That would reduce the amount of water that leaks.
Include that with the leak sensor just as a belts and suspenders backup.
I have some ideas for an "earthquake sensor" using a contact sensor with the magnet mounted on a pendulum.... will have to think further (look towards the Inland Empire for smoke... hehe).