There are many different types of float switches, some of which are mercury switches that activate by allowing the liquid metal to complete the circuit, and others that are simple floats connected to a microswitch that activates the device. They are common in sump pumps, dishwashers and other appliances.
With a sump pump, the float switch detects flooding in the sump. It activates the switch that starts the pump to operate. As the pump empties the sump, the float drops and the switch stops the pump from operating. In a dishwasher, the switch activates a valve to allow the appliance to fill with water. Once the liquid reaches the preset level, the switch causes the valve to close to prevent flooding.
In septic systems where gravity flow is not an option, installers often use a pump system. This system includes three mercury float switches. The lowest switch is set to stop the pump. The middle switch activates the pump. Under normal circumstances, the fluid level remains between these two switches, keeping the pump submerged in effluent water to protect it from corrosive sewer gas. However, if the pump stops working, the tank fills to the point of activating the third switch, causing an alarm to sound, warning the home occupant of a problem.