Automatic control of corridor lights