In our article about changing your air filters regularly, we mention this as a topic of interest. A float switch is mainly just an electronic water sensor for your HVAC system. In the event the float rises from condensation build up (water), the sensor is then engaged and shuts off the cooling system. Once the cooling system shuts off no more condensation is produced. This could save you from a possible insurance claim or thousands of dollars in damage.
Adding a condensation overflow shutoff switch is really a job for the pros, but if you try to tackle it yourself. Click here to purchase an in-line switch. Click here to purchase a switch for your secondary drain pan.
These are the two types of switches you are use. Personally I like the in-line condensate shut off switch, but if you only put on on the secondary drain pan, just make sure the condensation line overflows into the pan and not outside of it.