Micro switch on the door. Door open, light off, door closed light on. PIRs sense a change in temperature, so if you don't move thing forgets you are there. Pressure pad under floor? Infra red beam shooting right across the room?
Frank
When in room is no one, light also will turned on? And if I want to with this sensor turns on ventilation in the washroom, some time after the appearance of man, and on condition that he spent some time there.
You can of course turn the light on even button operation, but what if the door is accidentally opened and closed twice? Or the door has been left open...