Method for determining the temperature of an electronic component in an electronic device, the electronic device comprising the electronic component, a power converter device and a control system, the method comprising: - supplying a current to the electronic component via the power converter device, the power converter device being a switched-mode power converter, - measuring an input current I in supplied to the power converter device, - measuring an input voltage V in to the power converter device, - determining a power dissipation of the electronic component based on the measured input current, a value η for an efficiency of the power converter device and the measured input voltage of the power converter device, - determining the temperature of the electronic component based on the determined power dissipation and a thermal resistance value for the electronic component, wherein the step of determining the temperature of the electronic component comprises obtaining values for the power dissipation of the electronic component for a first task and a second task performed by the electronic component, and calculating a change in temperature, ΔT, of the electronic component when the electronic component changes from performing the first task to performing the second task according to: ΔT = θ * ΔP wherein θ is the thermal resistance for the electronic component and ΔP is the difference in power dissipation of the electronic component for the first and the second task, - providing the calculated change of temperature of the electronic component to the control system, and - controlling an operation of the electronic component according to the calculated change of temperature of the electronic component. - supplying a current to the electronic component via the power converter device, the power converter device being a switched-mode power converter, - measuring an input current I in supplied to the power converter device, - measuring an input voltage V in to the power converter device, - determining a power dissipation of the electronic component based on the measured input current, a value η for an efficiency of the power converter device and the measured input voltage of the power converter device, - determining the temperature of the electronic component based on the determined power dissipation and a thermal resistance value for the electronic component, wherein the step of determining the temperature of the electronic component comprises obtaining values for the power dissipation of the electronic component for a first task and a second task performed by the electronic component, and calculating a change in temperature, ΔT, of the electronic component when the electronic component changes from performing the first task to performing the second task according to: ΔT = θ * ΔP wherein θ is the thermal resistance for the electronic component and ΔP is the difference in power dissipation of the electronic component for the first and the second task, - providing the calculated change of temperature of the electronic component to the control system, and - controlling an operation of the electronic component according to the calculated change of temperature of the electronic component.