Faulty thermostat wiring needs to be replaced instead of repaired. There are two-wire and three-wire systems. In a two-wire system, there is one red and one white wire, which simply need to be connected to the correct location.
First, it is important that all of the electricity to the thermostat is off before beginning. The red wire, or hot wire, is connected to the R connection. This wire supplies all of the power to the thermostat, which allows it to operate. It also serves as the power control for the motor that controls the fan. The white wire connects to the W connection, and this wire's job is to create a circuit when the temperature changes.
Some thermostats also have a connector that is labeled as G or C, and it allows a common ground to get a connection. Thermostats that are powered by batteries usually don't have this connection, but if there is a C or G connector available, it should be connected. This is usually a black wire, but might be green on some models.
In a three wire system, there is also a red and white wire that connects in the same way a two wire system connects. There is also a yellow or blue wire. These are interchangeable and connect to the Y or B connection.