Optical Level Switch and Sensor