An electronic plumbing fixture fitting, comprising: a discharge outlet operable to deliver water; an electronic valve, the electronic valve being operable to permit flow of water through the discharge outlet when the electronic valve is activated and to prevent flow of water through the discharge outlet when the electronic valve is deactivated; a mechanical flow device, the mechanical flow device being operable to permit transmission of varying intensities of energy through the mechanical flow device based on the position of the mechanical flow device, a mechanical actuation device, the mechanical actuation device being operable to change the position of the mechanical flow device; and a parameter sensor, the parameter sensor being operable to detect the intensity of energy transmitted through the mechanical flow device and provide information to set at least one of a temperature and a volume of water flowing through the electronic flow device based on the intensity of energy detected the parameter sensor including an emitter (94, 96) and a detector (98, 100) characterized in that the mechanical flow device includes an inlet (76, 78) and an outlet, the emitter is mounted in the inlet (76, 78) and the detector is mounted in the outlet,, or the emitter is mounted in the outlet and the detector is mounted in the inlet; and when the emitter is activated, energy is transmitted from the emitter through the mechanical flow device to the detector. a discharge outlet operable to deliver water; an electronic valve, the electronic valve being operable to permit flow of water through the discharge outlet when the electronic valve is activated and to prevent flow of water through the discharge outlet when the electronic valve is deactivated; a mechanical flow device, the mechanical flow device being operable to permit transmission of varying intensities of energy through the mechanical flow device based on the position of the mechanical flow device, a mechanical actuation device, the mechanical actuation device being operable to change the position of the mechanical flow device; and a parameter sensor, the parameter sensor being operable to detect the intensity of energy transmitted through the mechanical flow device and provide information to set at least one of a temperature and a volume of water flowing through the electronic flow device based on the intensity of energy detected the parameter sensor including an emitter (94, 96) and a detector (98, 100) characterized in that the mechanical flow device includes an inlet (76, 78) and an outlet, the emitter is mounted in the inlet (76, 78) and the detector is mounted in the outlet,, or the emitter is mounted in the outlet and the detector is mounted in the inlet; and when the emitter is activated, energy is transmitted from the emitter through the mechanical flow device to the detector. the mechanical flow device includes an inlet (76, 78) and an outlet, the emitter is mounted in the inlet (76, 78) and the detector is mounted in the outlet,, or the emitter is mounted in the outlet and the detector is mounted in the inlet; and when the emitter is activated, energy is transmitted from the emitter through the mechanical flow device to the detector.