Water/flood sensor?

wildbill:
I'd be inclined to get something designed for the job - bilge pump float switch.

Slightly different job I think - the one thing you want from a flood detector is reliability after
years/decades of time without any maintenance or even any regular testing - you can put up
with occasional false positives, but a false negative is extremely bad. Anything mechanical
is subject to build up of dirt, corrosion, rodents, you name it.

I cannot imagine a situation where two metal electrodes will fail to conduct submerged in water,
however badly corroded, gummed up with crud, infested with insects/rodents. Seems pretty
failsafe, the wires connecting them are then the reliability issue, not the sensor.

In fact a conductivity sensor is quite likely to give false positives when dirt or corrosion or whatever
affects it, so it will self-diagnose deterioration.