Installing a door jamb light switch adds the functionality of putting a light in a closet and the convenience of not needing to turn the light on and off manually. Additionally, a light switch inside a closet can be difficult to reach, and the door jamb switch eliminates this problem. Door jamb light switches are convenient, relatively inexpensive, and they can be used on regular hinged doors. Additionally, you can save a little money on electrical bills because there's no need to worry about turning off the light.
Determine where you want to install the switch. This will usually be above the top hinge, if there is space for it. Switches are mounted on the hinged side of the door jamb. Most switches include mounting templates. Use the template to mark out where you want to cut the door jamb.
Drill out the corner holes using the drill bit. Then, use the chisel to remove the rest of the wood until you have the depth you need to install the switch junction box. Calculate the depth of the hole so that the switch cover plate will be flush against the door jamb when you are done installing the switch.
Determine where the knockout is on the back of the switch junction box. Using the knockout as a guide, insert the switch junction box into the hole, and use a pencil to mark the wood. Drill a hole where you marked through the door jamb and into the wall cavity.
Turn the off power to the circuit you are working on. Run a 2-conductor wire from the light down through the hole in the wood and into the back of the switch junction box through the knockout. Insert the switch junction box into the door jamb, and fasten it to the wood using the supplied screws. Connect the ground wire to the grounding screw. Connect the black and white wires individually to the terminals or wire tails coming off of the switch. Carefully fold the wires into the junction box and put the cover plate on.
Locate the feed hot wire (usually black) in the light junction box, disconnect it from the light fixture, and splice the feed hot wire to the white wire going to the door jamb switch. Cap the wires by putting a wire nut on the connected wires. Connect the black wire from the door jamb switch to the hot terminal or black wire pigtail on the light.
Carefully fold the wire back into the light fixture junction box and remount the light fixture to the junction box. Turn the power on and test the switch by opening and closing the door.