Float switch

The electrical component of a sump pump which turns on and off the pump when the floater floats to a certain height in order to remove water from a space.

(See image at sump pump).