I found some cool looking circuits at this website here’s one of them that
detect levels of water by shorting…kinda nifty~
This circuit not only indicates the amount of water present in the overhead tank but also gives an alarm when the tank is full. The circuit uses the widely available CD4066, bilateral switch CMOS IC to indicate the water level through LEDs. When the water is empty the wires in the tank are open circuited and the 180K resistors pulls the switch low hence opening the switch and LEDs are OFF. As the water starts filling up, first the wire in the tank connected to S1 and the + supply are shorted by water.