Sounds like you are getting some water leakage down into the switches or motor wiring connections or relays. If they work when it's not raining, I'd search for that happening and stop the leakage before I'd replace the switches as they are probably not bad.