In all the places I have seen automatic lighting controls I have not come across any that have not been a total pain in the butt.
Quite literally in a toilet we had at a University I worked at, that would plunge you into total darkness if you spent too long in a “stall” hidden from the PIR sensors. Most inconvenient when it happened at night.
Other places would turn off the lights if you were alone and sitting still, then you would have to wave your arm or get up. Great if you are in the middle of soldering something small.
I am not saying don’t try and do this, what I am saying is I don’t thing anyone has yet got it right.