Daylight Detector

A daylight sensor is a block for use with redstone circuitry. It works like a solar panel, emitting a redstone signal if it is bright enough (sunlight level) to do so. The strength of the redstone signal varies by the time of day. For example, the sensor will emit redstone for 15 blocks at midday but roughly 5 blocks at evening. The daylight sensor emits a redstone current to any/all blocks placed directly (within 1 block) above/below/next to it. In Minecraft version 1.8 the inverted daylight sensor will be added which acts contrary to the daylight sensor emmiting full redstone strength during night time on none during the day.

If a daylight sensor has an opaque block above it, then it will emit a weaker signal, or none at all, as it is directly proportional to the sky light, which can be useful for controlling light levels with redstone lamps and pistons to cover and uncover the sensor. Using a NOT gate (also known as an inverted Redstone signal) can reverse the sensor's signal, creating a "night sensor." This can, for example, allow redstone lamps to come on at night and off during daytime or a bunker that locks itself at night using the reverse signal and sticky pistons.

As a night time detector
By connecting the sensor to a NOT Gate (inverter), it will output a signal when the light level is LESS than 4, so you can, for example, make lights that turn on at night, or gates that automatically close.

You can also detect moonlight by blocking off the detector so it cannot see light, then pointing a comparator away from it.

Upcoming in Update 1.8 is way to make it a moonlight sensor. Right clicking the daylight sensor with an empty hand will turn it into an inverted daylight sensor. Using the detector instead of a not gate to turn on lamps does not work directly since it will only not emmit any redstone signal if the sun is at high noon.

As a clock
Because you can measure exactly what light level it is, you can make a clock. For example, for every light level it is, 1 light goes on a board. When it is night, the word "Night" is illuminated on the board displaying light level or time. This can be useful for servers, especially if you do not have the ability to create one using piston memory, or do not wish for one as it can be complicated or laggy.

As a timebomb
The daylight sensor can be placed atop TNT unlike most redstone devices. If planted at about midnight, this can make for an excellent timebomb, as the TNT will be ignited when the sun rises. Since the skylight is measured, which is shadowed out by blocks above, the sensor on TNT can be used in traps for players breaking the (e.g. ore or cake) blocks above the sensor. The Daylight sensor bomb can be rigged to go off at different times. If you want it to go off during the day, wire redstone to the TNT from the daylight sensor. While you can just place the sensor on top of the TNT, the TNT will glitch, and you will see the TNT go above the daylight sensor. For a bomb to go off during the night, a NOT Gate is needed. Other than that, it is the same. For a bomb to go off at noon, you will need a redstone comparator. The daylight sensor will go through the TNT, but since the lever is always full power, and the daylight sensor gets best power at noon, the bomb will go off at noon.

Timed jingle
Using some note blocks and redstone circuitry, you could make a set jingle that plays at certain times of the day, such as a device that warns you that nighttime is over, or is beginning. This could be used as a sort of morning alarm if you do not use a bed.

As a signal
The daylight sensor can easily be used to signal things at different times of day. With command blocks in the game, it can do many more things, like broadcast messages or change everyone's gamemodes (For whatever reason). Below are different methods for it.

Mining signal
If you are mining and you want to come up at a time of day, you can connect the daylight sensor and make it either send a redstone pulse down your mine or broadcast a command block message.

Command block command for message:

NOTE: On servers this will broadcast a message to the entire server.

So instead use this command to tell only yourself:

Message
You can send out a message to the entire server at a certain point of day. The command block command for this is:

OR

First broadcasts a message to the server, second one tells a message to a player.

As a Weather Monitoring Station
Using a redstone clock that is synchronized with the Minecraft day that is broken up into segments according to the daylight sensor power output schedule, it is possible to use many daylight sensors to build a rainstorm and thunderstorm detector. Use a comparator to reduce the redstone clock's signal strength to below that of the daylight sensor's clear day output. Wire this into the side of another comparator that has a daylight detector wired to the back. The wire coming out of the end of the comparator will deactivate whenever there is a storm. Using this you can detect both rain and thunderstorms using two lines with adequate comparator sensitivity. Using this you can signal an alarm whenever there is a storm, count the number of storms, count the duration of the storms using another clock and some type of memory, and even all three. Note, however, that if the chunk is unloaded for any length of time, the redstone clock will no longer be in sync with the daylight sensors.

Output
These tables link output values to the time they occur as well as co-occurring light levels. Note that while the sensor responds to changes in light level, the light level only modulates a separate scale that more or less follows sunlight. This modulation does make the tables invalid if the sensor doesn't have a direct view of the sky.

Clear skies
[[File:Daylight sensor output clear.png|thumb|400px|right|text-top|Graphed sensor output in clear weather.

(X-axis: minutes. Y-axis: signal strength.)]]

Night
An encased sensor emits a signal at night. The following table corresponds to a sensor that cannot receive any daylight. Weather is irrelevant at night. This is useful for things such as Street Lamps.

Trivia

 * Daylight Sensors only work by sunlight and cannot be activated by other light sources such as luminescent blocks or torches.
 * Daylight Sensors are less than a slab tall, which is like redstone repeaters, redstone comparators and trapdoors.
 * A daylight sensor connected to a powered dropper or dispenser will cause the dropper/dispenser to fire every time the light level changes.
 * Rain will affect the sensor.
 * Daylight Sensors, as well as most redstone technology, appear more similar to modern technology compared to most other blocks.
 * Daylight Sensors can be used as fuel in furnaces.
 * Due to the fact that a covered sensor gives output at night, it is possible to create a 24-hour redstone clock that is synchronous with the day-night cycle, that still works during the night.
 * A night sensor (a covered daylight sensor) will start giving redstone signal after 14341 ticks and stop after 21658 ticks instead of giving signals exactly at nighttime.
 * A daylight sensor would be used as a power source (solar panels) in the real world, but since it's extremely easy to generate redstone power in Minecraft it's useful only as a sensor.
 * While other blocks use a block entity to store additional data, the daylight sensor only uses its block entity to force it to regularly update its output signal strength.
 * The inverted form of the daylight sensor cannot be obtained as an item.

Gallery
Tageslichtsensor Sensor de luz solar Capteur de lumière du jour Daglichtsensor Detektor światła dziennego Датчик дневного света 阳光传感器