I've used off the shelf photosensors on the TEST mode for things like gate buzzers and driveway alarms. They shut off almost immediately when no motion is sensed.
If you install 2 of them, hook both the switch legs up to the primary of a 'Touchplate' transformer, and the secondary to a Touchplate (latching) relay to control the load it should take care of the situation.

...and it would use all unmodified UL listed parts