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 lightso 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.

Turning the sun into a switch

Output scales with the light, not with the hour

The signal rises and falls with the sky light level, so a clean fifteen only happens around noon under an open sky. Anything above it, including glass, weakens the reading, which is why a sensor on a roof behaves differently from one in a light well.

Inverting it makes a night light

Right click it and it outputs at night instead, which is the entire circuit for street lamps that switch on at dusk. The inverted sensor also reacts to rain, so a lighting system will occasionally turn on during a storm, and that is the sensor working correctly.

A comparator gives you a threshold

Feed the sensor into a comparator with a fixed side signal and you can pick the exact light level that trips the output. That is how a farm door opens at dawn rather than at the first grey light, and it costs one extra block.

Blocks and items in this guide

Daylight Detector in MinecraftDaylight DetectorRedstone Lamp in MinecraftRedstone LampComparator in MinecraftComparatorNote Block in MinecraftNote BlockObserver in MinecraftObserverRedstone in MinecraftRedstoneSpawner in MinecraftSpawner

All 7 of these are named in the guide above, starting with Daylight Detector. Look them up in the item database.

More guides on this site

Guides that go with this one

How to Use a Redstone Comparator in MinecraftA redstone comparator reads how full a container is and outputs a signal from 0 to 15. Here is how compare...How to Use a Lectern with Redstone in MinecraftA lectern plus a comparator turns the page you are on into a redstone signal, so flipping pages selects...How to Make a Chiseled Bookshelf in MinecraftA chiseled bookshelf stores up to six books in six slots and outputs a redstone signal. Here is the recipe,...How to Use a Sculk Sensor in MinecraftA sculk sensor detects vibrations within 8 blocks and fires a wireless redstone signal. Here is what sets it...How to Build a Path and Road in MinecraftBuild paths and roads that look like they lead somewhere: pick the right surface blocks, mix and edge them,...How to Use a Redstone Torch in MinecraftA redstone torch is an always-on power source that flips off when its block is powered, the basic NOT gate....

Related tools & databases

Tool
Minecraft Tools
Calculators and generators for servers and players.
Database
Item Database
Every item with its stats, IDs, recipes and uses.
Guides
More Farms & Redstone guides
Auto farms, contraptions and every redstone component explained.