How do you locate the door sensor that controls the overhead light in the cab of a 1998 Ford Ranger?
The sensor is intergrated into the door latch. If it is not working (and the door chime stays on) spray it with WD 40. This almost always works.
One can easily be installed. Locate the wire that runs to the water temp sensor. Splice this wire to a switch and then off to a ground. When you flip the switch it will ground the wire and make the fan come on. Do not get confused with the oil temp sensor. It controls the HOT oil light, not the fan.
Locate sensor in exhaust pipe below exhaust manifold. When cold, unpug the wiring connector above it. Wires are permanent to the top of the sensor. Spray the lower body (near threads) with penetrating oil; like PB Blaster or Liquid Wrench. Let soak. For easy removal slip large BOX wrench over sensor and loosen to remove; then replace with new unit.
I have had the same problem since it was almost new, the dealer said it is the switch in the doors that sticks. I never had it fixed since I would have to leave it there. It's not readily accessible, you have to take the door panel off. All I did was take the bulbs out of the overhead light, the "door ajar" light still will shine, but rather than have a dealer fix it…