A rearview mirror reflects ambient light and dims when light from headlights of a following motor vehicle is detected. Electrochromic mirror glass is fixedly secured to a frame within an opening. A sensor is fixedly secured to a housing for sensing ambient light and focused or glare light directed toward the rearview mirror. A light guide is disposed between the housing and the sensor for directing the ambient light and glare light outside the housing toward the sensor. The rearview mirror also includes a switching device for periodically disrupting the transmission of the light to identify a presence of the glare light, such that the sensor creates a dimming signal upon the identification of the presence of the glare light to dim the electrochromic mirror glass. The use of the switching device minimizes the number of sensors required by using the same sensor for measuring ambient light and glare light.