A sensor is designed to detect a potential water leak. Once a leak is detected, it will send a warning signal to the controller, which will shut off the main water valve.