This is an effective trick or puzzle when the sensor responds only to a certain color of light.
The default stance of the trick, is of course that once torch, lantern, or sun-rod light is shone on the trigger, the trap is set, but it is also a useful stance for constructing a puzzle.
Often the sensor will be visible as a colored opaque crystal sphere. This should be breakable of course but doing so should ruin the mechanism.
The trigger most certainly does not have to be binary. It can require a certain degree or configuration of light, or perhaps be part of a multi-part puzzle where the light that triggers the light detector also gives a clue to the next step in the process while allowing the puzzle to succeed (like opening a door or portal where something must be thrown).
S3 Expedition to the Barrier Peaks by Gary Gygax
2. STRANGLE VINES: . . .These creepers are attracted to the strongest light source, i.e. Continual Light, bright ship’s light, light, lantern, magic sword glow, torch light.
. . . If the ship’s lights are on the viewers will see various forms of large and small fish, and have a one in six chance of getting a glimpse of the “frog-thing”. . . Glints of gems will be seen from the lake bed! If they use lights in the observatory they absolutely will not only see that creature, but it will begin smashing at the plastiglass observation windows to get at the tender morsels within. The chance to break through is 5% per round. Attempts will cease as soon as the light is extinguished or the party is out of the monster’s sight.
S4 The Lost Caverns of Tsojcanth by Gary Gygax
1. SMALL CAVE WITH MANY TUNNELS
This low-domed chamber has its ceiling literally dripping with stalactites. . . A tribe of 18 troglodytes lairs in the five small tunnels which radiate from this cave. . . Unless the party is exceptionally quiet and shows no light, the trodlodytes will be lurking in ambush for them, and they will surprise the party on a 1-4 (d6) or a 1-2 if a ranger is leading the party.
T1-4 The Temple of Elemental Evil by Gary Gygax
339. HALL OF ELEMENTAL MAGIC
This huge echoing hall is constructed of polished black stones, which give back odd reflections of your light. The most striking features here are the symbols set into the chamber floor. To the north is a triangle of dull ecru stone, outlined with some sort of gray metal; a throbbing radiance seems to spread in dun-colored pulses that wash over the area. To the east is a great 10’ square of translucent stone, blue at the edges and shading to a deep green at the center, bordered by a strip of pale green; the whole gives out undulating sheets of blue-green light. To the south is a circle of translucent crystal ringed by a silvery band; the whole sends forth slowly rising clouds of pale light, that spread and disappear. To the west is a long diamond shape with four points radiating from the sides of the lozenge. The whole is fashioned of translucent stone mottled red and amber, outlined in red gold. It sends up sudden tongues of brightness, planes of pale fiery light that vanish as quickly as they appear.
All of these radiations gleam from the walls and floor of the hall. Any object in the center of the four symbols shows the four different illuminations, and the ghastly purple of their mix.. . . Any creature who steps into the area of an elemental symbol and stands there for 3 segments is transported to the corresponding Elemental Node: the Air Cavern (circle), the Earth Burrows (triangle), the Fire Pits (lozenge), or Water Maze (square). The only way to escape therefrom is to win through to another “gate” area or to possess the complete Orb of Golden Death, inset with all four proper gems.
Light detection design
Early use can be situations in which characters must maneuver without light to avoid an enemy. Simple puzzles can differ based on the time of day or season. Mirrors to reflect light into certain spots (with multiple solutions so that players might discover one and not another). Later, more difficult puzzles can be avoiding light being used as a tripwire, or environments that change based on available light (such as a room that is different at night than during the day).