Minecraft wiki entry for Secret_door, associated text: The daylight sensor can be used to open a door only at a certain time. This works well with piston doors such as a half Jeb door. Since it is unlikely you want the door to be in plain sight when open, this may be best combined with other mechanisms to use the daylight sensor as a lock. For example, the daylight sensor could be used to open a door behind a painting. It does restrict when the player can open the door, however. This could cause problems with frequent use.