How to re-pair switch and termosat

I have a thermostat añd à switch that tàke
Loñg time to respond to a command. How
Do I re-do the setup?