Water/flood sensor?

float switches would be more reliable i guess compared to the HC-SRO4 . if you really want an ultrasonic sensor then water proof the PCB area or else go for a sealed unit .

i use both float (upper and lower cut off) and ultrasonic (water level ).