A sensor system includes at least two sensors for distinguishing accommodative stimuli from changes in ambient lights levels and task-induced changes in the pupil diameter. When implanted, the first sensor is disposed completely within the pupil even when fully constricted, the pupil does not occlude the first sensor, allowing the sensor to make precise measurements of ambient luminous flux levels. The pupil occludes part of the second sensors active area(s) as the pupil dilates and constricts. As a result, the second sensor measures both ambient luminous flux and pupil diameter. A processor estimates the pupil diameter and determines whether its changing in response to accommodative stimuli or other factors by comparing to predetermined values. The sensor system sends a signal to an optical component, which in turn can respond by changing optical power to focus for near vision upon detection of accommodative stimuli.