While in college I lived in an apartment building that the basement always flooded. Sometimes the sump would take care of it, other times not so much. Since I’m a nice guy I was constantly checking the basement during wet weather so that the Landlord didn’t have to. To make my life easier, I designed and then built this alarm. I used two pieces of copper wire for the electrodes, about 1 inch apart from each other. When the two electrodes are submersed in water, the 2n3904 transistor “sees” the resistance and closes it’s gate turning the buzzer on alerting the inhabitants of the watery basement situation.
Note: I tinned them with solder to keep them from corroding. Worked great for the couple years I was there and still working now as far as I know. Original version was designed in 2007, v1.1 adds a switch so you can turn it off when you get into the basement to fix the situation.