Originally Posted By: robricc
It's not what you're asking for, but I have these in my two hall closets. They generally work well. They always come on when I open the door. They usually stay on if I'm standing in front of the closet for a while.
I have used motion sensors for lighting in closets. One annoyance was if the door was left open the light would cycle on each time someone moved near or walked past the opening.

Always multiple ways to solve a problem.