Abstract: A system for controlling a light source illuminating plants in a greenhouse, the system includes: a sensor for detecting a first spectrum of ambient light, the sensor being configured to measure incident intensities in at least two wavelength ranges, and a control unit for adjusting a second spectrum of the light source in dependency of the measured intensities in the at least two wavelength ranges; and a method for operating a system for controlling a light source illuminating plants in a greenhouse, the method includes a measuring step where the sensor detects incident intensities in at least two wavelength ranges, and an adjustment step the second spectrum of the light source is adjusted in dependency of the measured intensities in the at least two wavelength ranges.