Abstract: The invention relates to a method that can be used to compensate the influence of the temperature on the optical output power (light power) of light emitting diodes and laser diodes without the need to measure the temperature or light power. The method is based on the fact that the current flowing through a light emitting or laser diode and the forward voltage drop on the diode are at a constant light power independent of the temperature in a functional correlation that is often linear and can be obtained. If it is known, it must only be achieved during operation that the current and the forward voltage exhibit this correlation in order to eliminate the temperature effect on the light power.