Using two wires to detect water - making your own water sensor

Would one of these work?

They have comparators on them to set the moisture sensitivity.

Some of them have built-in relays.