I think OS X built-in setting work just like that. I.e. turn on automatic brightness, then move slider to make screen dimmer.
I've just tried making the screen really dim, then pointed flashlight onto light sensor. The screen went super bright, but after turning flashlight off it got back to my dim setting.