I use Xiaomi's Zigbee water sensors (~$15 ea) with Home Assistant (using the Zigbee support via zigbee2mqtt).
They report back instantly if water is detected. No cloud involved at all.
I have pumps for a garden and if something overflows, it will turn off the master switch to stop the water...