Too test if its working, in the daylight, with the ignition on {all lights on dash , ign position 2 } place your thumb over the sensor in the front forward facing mirror back, you should see the mirror dim over a few seconds, release your thumb and it should lighten up again. It tricks to sensor into thinking that the light behind the car is brighter than the light infront of it and dims the mirror .
If its failed then ......here you go.....its all here and easy to rectify
http://www.z4-forum.com/forum/viewtopic.php?f=34&t=68814&p=1317488&hilit=interior+mirror+bubble#p1317488