That's what precisely this Water Level Sensor means that you can do! It could possibly measure the water level, monitor a sump pit, detect rainfall, and detect leaks. Optical level sensors functionality by changing light rays into electrical alerts. They measure a Actual physical percentage of light-weight then translate it https://controltechme.com/ultrasonic-level-sensor/