From 09/2001:
WARNING: This page is about a different car, the 2003 BMW X5, 2002 BMW X5, 2001 BMW X5, and 2000 BMW X5. However, it is still accessible from the selected car via links, so may be relevant.
Version with rain/light sensor.
Expand two-part mirror base cover (1) by pressing from below and detach.
Feed out two-part mirror base cover (1) and remove.
Disconnect plug connection (3).
Press locks (1) in direction of arrow and remove rain/light sensor (2) towards bottom.
Installation:
Do not damage optical element below rain/light sensor (2).
If necessary, initialize rain/light sensor. Refer to 61 35 680 INITIALIZING RAIN SENSOR .