First Home Fixes logo

Home / Electrical Basics

Replace Photocell Sensor on an Outdoor Light

5 min read · Updated 27 November 2026 ·

Part of: Electrical safety

Flat illustration for the guide about replace photocell sensor, showing the relevant item with simple tools
Difficulty
Easy to moderate
Time
15 to 45 minutes
Tools
Stable ladder, screwdriver, non-contact voltage tester, wire nuts, electrical tape, new photocell
Call a pro if
the fixture is damaged, wires are brittle or you are not sure how the sensor is wired
In this guide
  1. Check the simple things first
  2. Test the sensor by covering it
  3. Step by step: replace a plug-in or twist-in photocell
  4. Step by step: replace a wired photocell
  5. Choose the right sensor
  6. Signs that point to each cause
  7. Prevention
  8. Placement tips
  9. Check for a bad ground or loose neutral
  10. Match the sensor to LED fixtures
  11. Related guides
  12. FAQ
  13. When to call a pro
Safety. Turn off the breaker and confirm the wires are dead with a tester before you touch them; an outdoor fixture is often on a circuit you cannot see from the switch. Work from a stable ladder on firm ground with three points of contact, and do not work in rain or wind. Turn off the power at the breaker and test before you touch wires. Do not rely on the wall switch alone. Use a ladder on level ground and keep three points of contact. Do not work in the rain. Use wire nuts rated for outdoor use. If the box is damaged, wet or has burned wires, stop and call an electrician.

When a light stays on all day or never turns on, you may need to replace photocell sensor parts. A photocell is a small light sensor that turns an outdoor light on at dusk and off at dawn. When it fails, the light may stay on all day, never turn on or flicker at night. Many photocells plug in or screw into the fixture, so replacing one is easy. Some are wired in, which needs more care. This guide shows how to test the sensor, choose a new one and replace it safely.

This guide is part of our wider guide to lights, ceiling fans and fixtures.

Check the simple things first

A photocell needs a clear view of daylight. Check that dirt, a spider web, paint or a nearby light is not covering it. A porch light that shines on the sensor makes it think it is day. Clean the sensor window with a dry cloth. Check the bulb as well. See How to remove a stuck or broken light bulb.

Test the sensor by covering it

At dusk, or in the daytime, cover the sensor with a dark cap or a piece of tape. If the light comes on after a minute, the photocell is working. If it does not, the sensor, the bulb or the power may be the problem. Remove the cover and see whether the light comes on. If the light stays on in the daytime, the sensor has failed closed, or it is lit by another source.

Step by step: replace a plug-in or twist-in photocell

1. Turn off the power at the breaker for the fixture.

2. Use a voltage tester to confirm that the power is off.

3. Twist the old photocell counterclockwise and pull it out. Some have a locking tab.

4. Check the socket for rust or burns.

5. Insert the new photocell and twist it clockwise until it locks.

6. Turn the power on and test by covering the sensor.

Step by step: replace a wired photocell

1. Turn off the power at the breaker, and test the wires.

2. Remove the cover or the fixture from the wall.

3. Take a photo of the wiring, and label each wire.

4. Unscrew the wire nuts and separate the old photocell leads.

5. Connect the new photocell to the same colors. Black to black, and so on.

6. Cover each splice with a wire nut, and tape if the instructions say so.

7. Place the sensor so it faces away from the light.

8. Close the fixture, restore the power and test.

Choose the right sensor

Check the voltage and the load rating of the sensor, and make sure it fits the fixture. Some fixtures have a built-in sensor that can be replaced as a module. Others use a separate sensor that mounts on the wall. LED fixtures may need a sensor made for low loads. Read the label, and match the type.

Signs that point to each cause

A light that stays on all day has a failed sensor, a sensor lit by its own light, or a stuck relay. A light that never turns on at night has a failed sensor, a bad bulb or no power. A light that cycles on and off at dusk may be affected by its own light. A light that flickers in the evening can have a loose wire. See How to install a motion sensor light and How to replace an outdoor light fixture.

Prevention

Clean the sensor each season. Keep branches and paint off it. Check that the fixture is sealed from rain. Replace sensors that are cloudy or cracked. Test the sensor at the start of winter.

Placement tips

Point the sensor toward open sky, away from windows, streetlights and the light it controls. Shield it from direct sun with a small hood if the sun hits it all day. Mount it where it is not shaded by trees in summer. If the light is on a long wire run, keep the sensor close to the fixture.

Check for a bad ground or loose neutral

If a new photocell does not fix the problem, look at the fixture wiring. A loose connection inside the fixture can make the light flicker or fail, and it can look just like a sensor fault. Turn off the power, test it, and check that each wire nut is tight and the copper is clean. Do not touch a wire that looks burnt. Call an electrician if you see damage.

Match the sensor to LED fixtures

Some older sensors do not work well with low power LED fixtures and may flicker or keep the light dim. If your fixture uses LEDs, choose a sensor that lists LED use on the label. This small check saves a second trip to the store.

FAQ

Why is my light on in the daytime? The photocell may have failed, or it sees the fixture's own light.

Can I bypass the photocell? It is better to replace it. Bypassing needs wiring changes.

How long do photocells last? Often many years, but sensors do fail.

Will any photocell fit? No. Match the type, voltage and load.

replace photocell sensorreplace photocelloutdoor light sensordusk to dawn lightlight stays on

More from this topic

Illustration of an outdoor wall light with a motion sensor and detection arcs, a ladder, a screwdriver and wire nutsElectrical BasicsHow to Install a Motion Sensor LightHow to install a motion sensor light on an existing outdoor fixture: turn off power, wire it, set the sensor and test. Steps, tools and safety notes.Flat illustration for the guide about outdoor light timer, showing the relevant item with simple toolsElectrical BasicsOutdoor Light Timer: How to Install One SafelyWant lights on at dusk? Install an outdoor light timer on a weatherproof outlet: pick the right type, check the load rating and set it up safely.Flat illustration for the guide about replace a doorbell transformer, showing the relevant item with simple toolsElectrical BasicsHow to Replace a Doorbell TransformerLearn how to test and replace a doorbell transformer. Find it, check the voltage, turn off the power and wire a new one safely. Step by step guide.Flat illustration for the guide about outdoor light fixture filling with water, showing the relevant item with simple toolsElectrical BasicsOutdoor Light Fixture Filling With WaterOutdoor light fixture filling with water or fogging up? Turn off the power, find the leak at the gasket, cap or box, dry it out and reseal it safely.Flat illustration for the guide about three-way switch not working, showing the relevant item with simple toolsElectrical BasicsThree-Way Switch Not Working: How to Find the ProblemThree-way switch not working? Learn how two switches control one light, how to check the bulb, the breaker and the wiring, and when to call an electrician.