I am trying to replace a light switch with a neutral required motion sensor light. (occupancy sensor).

The motion switch has a black, red, white and green wire connected to it. Upon taking off the current switch, I have a blue and black wire connected.

In the box, I see two red wires connected by nut and what looks to be three white wires connected by nut. So no green ground but an extra color plus too many whites!

Any help will be appreciated.

Switch wiring

  • You've got metal box plus you've got colored wires which means conduit. Do you know if you have metal conduit? If so, that's your ground. Jun 17, 2020 at 2:13
  • Can you provide us with photos that show the back of the box clearly please? Jun 17, 2020 at 2:32
  • Can't clearly see what's going on there, but looks like an arc shield/box extender will be required to bring this switch location up to code. Jun 17, 2020 at 14:51

2 Answers 2


There are not too many whites! All those whites have a job. They are "working for a living". You do need to add your switch's neutral wire to that bundle. Do so competently. All the whites must still be connected to each other when you are done!

The red wires are probably the other half of a multi-wire branch circuit. This is a serious complication. Because the black?Blue? wire will be on one circuit breaker, the reds will be on another breaker, and you must turn them both off in order to safely separate the neutrals.

  • In fact, Code now requires those 2 breakers be handle-tied so they must be shut off together. (for this very reason). If you're lucky, they're already that way. Otherwise you will need to do the "legwork" to identify the red breaker and assure it is off, before separating the neutrals. Once you've done that, either acquire a correct handle-tie, or get a 2-pole (NOT A DUPLEX) breaker (whose handles will be tied from the factory) and replace both breakers with that. Note the 2-pole breaker will take the same amount of room in the panel as both old breakers.

The new switch will care very much which wire is the supply from panel and which is the onward wire to the light. In your box, one is black and one is blue. It's legal both ways, so we don't know what the installer did. Regardless, it is safe to experiment here: simply connect them black-black and red-blue. If that doesn't work, swap them.

You must wire a ground wire to this switch, as Patrick discusses. That is because the mounting screws can't make contact with the junction box through that wood-like material. In fact, you can't have burnable wood-like material like that be a "sleeve" for a junction box! That needs to be notched out (e.g. with an oscillating saw, those things are amazing lol) to fit either a box sleeve, or better, a steel box extension. That needs to be done everywhere that is like that. Otherwise a wiring problem in the box couls start a fire!


The white wire is the neutral and is never switched. I do not see a ground wire, so the conduit may be grounded. Check the voltage between the box and the black wire it should be 120 volts. Voltage between the black (hot) and the incoming white wire should be 120 volts. Attach a ground screw to the screw hole in the box and run a (green or bare) wire from the screw to the device. You need the instructions for the device you should find this on line, but I would say that the black wire from the device is wired to the incoming black hot wire, the red wire goes to the light and all the whites are connected together. It is possible that there may have been a three way switch in this box at one time. The other wires may have been travelers

  • Red is the more typical switched hot color, but in this case Upon taking off the current switch, I have a blue and black wire connected. so if black is incoming hot then blue is switched hot. Jun 17, 2020 at 3:41
  • The screw you need is a #10-32 in size. They even make green ones if you want to be stylish :) The hole is the slightly smaller of the 6 holes visible, or on some boxes it sits on a raised "nub". It is already tapped 10-32. Jun 17, 2020 at 18:43
  • I believe green is required by code. If a hole is not taped you have to tap it . There is a tap that looks like a screw driver and has the three sizes, on the same shaft, used in metal boxes.Good tool for your tool box.
    – Patrick K
    Jun 18, 2020 at 16:04

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.