The iMac light sensor controls the brightness of both monitors automatically. You can even insert a fixed offset to match the absolute brightness of both monitors.
But my Mac has no brightness sensor (it's a mini). I use the screen with my PC and a raspberry pi as well so I couldn't use an iMac, though I have one at the office (if I ever go back there...). It's really a shame they got rid of the target display function, this would have been perfect :(
The iMac light sensor controls the brightness of both monitors automatically. You can even insert a fixed offset to match the absolute brightness of both monitors.