2001 Ford Ranger XLT extended cab

The driver’s-side door lock switch operates correctly for the majority of the time. However, when it is below 40?F the switch tends to work intermittently. There doesn’t seem to be a correlation between how poorly the switch works and the actual temperature. I have purchased a new switch but have not yet had time to install it. Any ideas about why the lock switch is temperature sensitive?

I don’t think it is the switch that is temp sensitive,more likely it is the latch or the electric actuator.