
Power efficient, adjustable, light-sensitive switch using an LED:
You can use an LED as a photoelectric sensor. A previous Design Idea shows that such a switch is highly power-efficient, consuming almost no power (Reference 1). However, you cannot adjust that configuration to switch at the desired light intensity. You can adjust the circuit in this Design Idea to any threshold level of light intensity necessary to maintain the on state of the photoelectric switch while retaining almost the same power efficiency of the original circuit
Via Electronics Lab.

If you are using a micro-controller, there is a much easier way to do this. Reverse bias the diode to put a charge on the junction. The charge will dissipate as a function of light reaching the junction. Just put this on a timer capture pin and you’re good to go.