Question:
Can one go in into a bathroom were the stalls have light sensor
Answer:
Essentially it should be avoided, because the sensors are made for you and you are benefiting from the turning on of the light. If you aren’t left with another choice, there is room to be lenient, for “kavod habrios”- human dignity.
Best wishes
Sources:
Machon Halacha and Technology