Skip to main content
← All Guides
Redstone · Mechanic · Java & Bedrock

How to Use a Daylight Sensor

A daylight sensor turns the position of the sun into a redstone signal: nearly 15 at noon, fading to 0 at night. Flip it to inverted and it does the opposite, which is how automatic lights know when to come on.

15output
(day mode)
daylight sensor
street light
(inverted)
Day sensorNight sensor (inverted)
A daylight sensor outputs with the sun: strongest at noon, zero at night. Right-click to invert it and it powers your lights the moment the sun goes down.

Normal vs inverted

Right-click flips between them; the top texture tells you which is which.

Normal
Outputs with daylight: peaks at noon, off at night. Good for day-only farms and opening things at dawn.
Inverted
Outputs at night and switches off in the day. This is the one for automatic street lights and night defences.

What to build with it

Automatic street lights that switch on at dusk (invert the sensor, wire it to redstone lamps).
Doors, curtains or covers that close at night and open at dawn.
Day-only or night-only farm and mob-spawner triggers.
A bell or note block that chimes every sunrise.
Sealing a base at night and reopening it in the morning.

Reading the sky

The sensor measures sky light, so it must have a clear view upward. Glass above it works, a solid block does not, and going underground kills the signal. Rain and snow dim the reading, and the output eases smoothly through dawn and dusk rather than flicking on and off, so leave a little margin if you are triggering on an exact value.

Quick answers

What does a daylight sensor do?
It reads the sky light and outputs a redstone signal that follows the sun: around 15 at noon, dropping toward 0 at night. That lets redstone react to the time of day on its own.
How do you make a daylight sensor output at night?
Right-click it to invert it. The top texture changes and the output flips, so it powers up at night and switches off during the day. Right-click again to go back to normal.
How do you make automatic street lights?
Invert a daylight sensor and run its output to redstone lamps. The lamps come on the moment the sun sets and switch off again at sunrise, with no clock to tune.
Does a daylight sensor work through glass or underground?
It has to see the sky. Glass and other transparent blocks above it are fine, but a solid block on top, or being deep underground, blocks the light and drops the output to 0.
What is the strongest signal a daylight sensor gives?
A full 15 at noon under a clear sky. Dawn, dusk, rain and snow all lower the reading, so the signal eases up and down rather than snapping between values.
Daylight sensor or a redstone clock for day and night?
The sensor reads the real in-game light directly, so it stays in sync with the actual day. A hand-built clock drifts and has to be tuned, which makes the sensor the simpler choice for day-night switching.
Database →
Daylight sensor & lamps
Look up the daylight detector, redstone lamps and more.
Guide →
Use an observer
Another way to make redstone react to the world on its own.