Disconnect the dryer from the electrical outlet. Remove the dryer door by unscrewing the screws located at the hinges and pulling the door off. Remove the front panel from the dryer by removing the screws and sliding the panel off.
Loosen the holding screw with a 1/4-inch socket and ratchet, but do not remove it. Use a pair of needle nose pliers to pull the sensor down and out.
Disconnect the two wires from the old sensor. Attach the wires to the new sensor. Grasp the sensor with the pair of needle nose pliers and set it back into position. Bend the bracket downward to clear the holding screws.
Tighten the holding screw with the socket and ratchet. Reattach the front panel and door to the dryer.