When using a daylight sensor to power a sticky piston; in this case to lift a redstone block, to power a light source at night.
Symptoms: Normally, at night, uncovered, the piston is retracted and the lights come on. During the day, piston is powered, pushes the piston down and breaks the circuit.
Affected behaviour: (note blocks not touching the sensor - this occurs with at few blocks of air above the sensor) enveloped in glass block, and then covered with one layer of water, the daylight sensor sends a signal during the day to power the piston, but reverses at night; effectively opposite behaviour.
When covered by double glass block followed by single layer of water, the daylight sensor becomes inoperative during day and night.
When covered with transparent blocks directly next to and above the daylight sensor, and covered by water, sensor becomes inoperative during day and night.
Related issues
Comments
Partial duplicate of MC-5927.
Ymus, how does one becomes a mod?
After passing through the water or ice sunlight statr to behave like every other light souce: decrease by 1 for each block passed (and additional 2 for water and ice). So two glass blocks and a layer of water give you sunlight level 9 right under lower glass block, 8 in next block and so on. Might be the case.
Edit: tested under your conditions: Daylight sensor works, but with decreased power you can expect from decreased light level.