An optical communication module comprising: an optical device configured to provide an optical output from an electrical input; a circuit board on which the optical device is mounted and which is configured to provide the electrical input to the optical device; a temperature compensation element mounted on a side of the circuit board; the optical communication module being characterized in that it further comprises: a mechanical switch comprising a bi-metal, wherein the mechanical switch is connected to the temperature compensation element and is configured to turn on/off according to ambient temperature for supplying or interrupting power to the temperature compensation element by said bi-metal; and a module housing, wherein the optical device, the circuit board, the temperature compensation element and the mechanical switch are accommodated in the module housing, and wherein a stationary air layer contained in said module housing is between the optical device and the mechanical switch, wherein the optical device and the temperature compensation element are mounted on opposite surfaces of the circuit board, the optical device and the temperature compensation element being mounted at overlapping positions with the circuit board there between, and wherein the mechanical switch is mounted on an inner wall of the module housing away from the circuit board and surrounded by the stationary air layer insulating the optical device and the mechanical switch from each other. an optical device configured to provide an optical output from an electrical input; a circuit board on which the optical device is mounted and which is configured to provide the electrical input to the optical device; a temperature compensation element mounted on a side of the circuit board; the optical communication module being characterized in that it further comprises: a mechanical switch comprising a bi-metal, wherein the mechanical switch is connected to the temperature compensation element and is configured to turn on/off according to ambient temperature for supplying or interrupting power to the temperature compensation element by said bi-metal; and a module housing, wherein the optical device, the circuit board, the temperature compensation element and the mechanical switch are accommodated in the module housing, and wherein a stationary air layer contained in said module housing is between the optical device and the mechanical switch, wherein the optical device and the temperature compensation element are mounted on opposite surfaces of the circuit board, the optical device and the temperature compensation element being mounted at overlapping positions with the circuit board there between, and wherein the mechanical switch is mounted on an inner wall of the module housing away from the circuit board and surrounded by the stationary air layer insulating the optical device and the mechanical switch from each other. a mechanical switch comprising a bi-metal, wherein the mechanical switch is connected to the temperature compensation element and is configured to turn on/off according to ambient temperature for supplying or interrupting power to the temperature compensation element by said bi-metal; and a module housing, wherein the optical device, the circuit board, the temperature compensation element and the mechanical switch are accommodated in the module housing, and wherein a stationary air layer contained in said module housing is between the optical device and the mechanical switch, wherein the optical device and the temperature compensation element are mounted on opposite surfaces of the circuit board, the optical device and the temperature compensation element being mounted at overlapping positions with the circuit board there between, and wherein the mechanical switch is mounted on an inner wall of the module housing away from the circuit board and surrounded by the stationary air layer insulating the optical device and the mechanical switch from each other.