My closets are the kind with door doors, either of which slides to the side, overlapping the other. I'd like to have the light inside the closet come on when either of the doors is opened. This is for new construction - how do I wire this up?

  • We have a light switch that activates the light to comes on when the closet door opens but I want to warn you, the switch wears down the contact (closet door). I put epoxy over the warn down wood and it lasted for a couple to few years but I just noticed today that it has also warn down. Now the light stays on. Time to repair again! I might opt for the motion sensor if this second repair doesn't last. Good suggestion.
    – user34120
    Commented Feb 26, 2015 at 2:31

3 Answers 3


From a functional point of view, you want the two switches in parallel, normally-closed but held open when the door is in its closed position, so that if either door is open the switch closes and the light comes on. The switches may control the light directly or, if they are low-voltage switches, may control a relay which controls the light. (If you're using a relay, you can also potentially substitute a pair of normally-open switches in series; just use the inverted relay output.)

Mechanically... The switches I'd normally think of for this purpose either wouldn't be reliable or wouldn't be pretty. The best thought I've got is a low-voltage circuit, using alarm-style reed switches. These would involve switches mounted on the door frame with magnets mounted on the door edge nearest the frame. When the magnet is close enough, it pulls the reed in the switch out of its "normal" position. The advantage of these is that the magnets will tolerate a bit of gap rather than having to come directly in contact with the switches; how much gap depends on exactly which switch/magnet set you buy.

I could make it work... initially. Keeping it working, given how notorious these doors are for going out of alignment and slipping off their tracks, might be another matter.

  • I have this exact setup on my closets using the magnetic reed switches. It has been installed for about 6 years and I haven't had to touch them since I installed them. They work great. I recommend using normally closed switches in parallel to a relay. If you do the opposite to a relay, I believe that you will be putting extra wear on the relay by having it on the majority of the time while the doors are closed. Also, if the relay fails, the lights will turn on.
    – Edwardt
    Commented Sep 6, 2014 at 21:21
  • Some relays are happy being continuously energized, some aren't... but that's a valid concern; thanks for the addition.
    – keshlam
    Commented Sep 6, 2014 at 21:26

There are standard switches for closet doors

closet door switch

They can be mounted in a cutout in the jamb, one for each door on each side.

For your purposes, you want normally closed switches (makes contact when no pressure is applied). Many can be wired either way. When the door is slid back into the switch, the circuit opens and turns out the light.

 Images and links are for illustration only, and not an endorsement of goods or sources.
  • I just have a bit of trouble convincing myself that the doors will reliably close far enough to engage that switch, after the system has interacted with the Real World for a few years. Hence my thought of using something that requires only proximity, not contact. I may be overthinking it, admittedly; the sliding doors in my place align OK but I've seen too many that don't.
    – keshlam
    Commented Sep 6, 2014 at 21:04
  • You could use magnetic latches to hold the doors tight against the switches. I don't know of any proximity switches that will work without separate relays.
    – bib
    Commented Sep 6, 2014 at 22:19

Would you try a motion sensor inside the closet rather than a jamb switch? That would allow the bypass sliders to close either way, and the light would go off after a certain time whether the doors were tightly closed or not. The motion sensor would trigger when one reached in to the closet, but getting it to come on reliably might be a bit finicky.

  • This is a valid alternate solution to a jamb switch, but it still doesn't address the actual problem the OP needs clarification on: "How do I wire it?" Should be a comment instead.
    – Doresoom
    Commented Jan 23, 2015 at 14:57
  • 2
    I disagree that this isn't an answer. "How do I wire it" wasn't specific about using physical switches, so wiring to a motion sensor seems to be a valid and useful answer that wasn't addressed by the other answers.
    – BMitch
    Commented Jan 23, 2015 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.