Water-loving photoelectric M18 sensor