Switch for a ceiling fan