The Timepix3 readout ASIC chip is a hybrid pixelated radiation detector, designed at CERN, which contains a 256 px256 px matrix. Each of the 65,536 radiation-sensitive pixels can record an incoming particle, its energy deposition or time of arrival and measure them simultaneously. Sincethe detector is suitable for a wide range of applications from particle physics, national security and medicine to space science, it can be used in a wide range of temperatures. Until now, it has to be calibrated every time to the operating point of the application. This paper studies the possibility of energy measurement with Timepix3 equipped with a 500μm thick silicon sensor and MiniPIX readout interface in the temperatures between 10 °C and 70 °C with only one calibration. The detector has been irradiated by X-ray fluorescence photons in the energy range from 8 keV to 57 keV, and 31 keV to 81 keV photons from the 133Ba radioactive source. A deviation of 5% in apparent energy value may occur for a 10 °C change in temperature from the reference point, but, with the next temperature change, it can reach up to -30%. Moreover, Barium photons with an energy of 81 keV appear as deposited energy of only 55 keV at a detector temperature of 70 °C. An original compensation method that reduces the relative measurement error from -30% to less than 1% is presented in this paper.