The short stem float sensor that detects when the water level is full.
This device is a reed switch. A reed switch is a pair of hermetically sealed contacts that open and close with a magnet. The float on this device has a magnet.
The switch contacts will close when the float is in the down position. To test this switch, connect the leads to a continuity meter. With the float up the meter should read an open circuit. With the float down, the meter should read zero ohms.