I did exactly that:
http://www.mini2.com/forum/faults-fixes/47434-brake-warning-light.html and it worked perfectly well at my first try.
You said you've replaced the sensor did you? Then I suppose it is with a new one because once the light comes out you can't use the sensor that triggered it anymore.
Hope it helps. Good luck.
