Not only the plunger switch but on models with the motor there is a rain sensor, it is sensing rain
The rain sensor is basically a printed circuit board, with two strips of conductive metal, often in a serpentine shape, small etched path between them,, If water drops land on it they connect
if an insect gets splatted on top, that can do it too
Step one is to clean the rain sensor. And the switch,, With the top open (manually) and power of, both jobs are easy,, operate the plunger switch by hand like 20 to 50 times, "Erase" the printed circuit rain sensor (Pencil erasor followed by a blast of air or soft brush to wipe the eraser parts off).
Never done one on a fan, but done a lot of other switches and a few of those contact type sensors that way.