Method for limiting the variation in the temperature of an electrical component equipped with a heat evacuation face, this method comprising: a) acquiring the value of a physical quantity representative of the temperature of the electrical component and/or of a physical quantity representative of the amount of heat produced per second by this electrical component; and b) detecting, based on the one or more values of the physical quantities acquired, when the electrical component switches (46, 50) between: - an active state in which the electrical component must be cooled, and - a passive state in which the electrical component may be heated, characterised in that the method also comprises steps of: c) in response to detection of the switch from the passive state to the active state, controlling (54, 56; 134, 136) a voltage source to vary a potential difference between first and second electrodes of a capacitor from a first value to a second value and then, if this second value is reached before the next time the electrical component is detected to switch from the active state to the passive state, to maintain this second potential difference value provided the electrical component is in the active state, the electrodes being mechanically and electrically insulated from each other by a layer of electrocaloric dielectric material, the first electrode making conductive thermal contact with the heat evacuation face of the electrical component and the first and second values being such that this variation in potential difference causes heat to be absorbed by the electrocaloric dielectric layer; and d) in response to detection of the switch from the active state to the passive state, controlling (58, 60; 138, 140) the voltage source to vary the potential difference between the first and second electrodes of the capacitor from the second value to the first value and then, if this first value is reached before the next time the electrical component is detected to switch from the passive state to the active state, to maintain this first potential difference value provided the electrical component is in the passive state. a) acquiring the value of a physical quantity representative of the temperature of the electrical component and/or of a physical quantity representative of the amount of heat produced per second by this electrical component; and b) detecting, based on the one or more values of the physical quantities acquired, when the electrical component switches (46, 50) between: - an active state in which the electrical component must be cooled, and - a passive state in which the electrical component may be heated, - an active state in which the electrical component must be cooled, and - a passive state in which the electrical component may be heated, c) in response to detection of the switch from the passive state to the active state, controlling (54, 56; 134, 136) a voltage source to vary a potential difference between first and second electrodes of a capacitor from a first value to a second value and then, if this second value is reached before the next time the electrical component is detected to switch from the active state to the passive state, to maintain this second potential difference value provided the electrical component is in the active state, the electrodes being mechanically and electrically insulated from each other by a layer of electrocaloric dielectric material, the first electrode making conductive thermal contact with the heat evacuation face of the electrical component and the first and second values being such that this variation in potential difference causes heat to be absorbed by the electrocaloric dielectric layer; and d) in response to detection of the switch from the active state to the passive state, controlling (58, 60; 138, 140) the voltage source to vary the potential difference between the first and second electrodes of the capacitor from the second value to the first value and then, if this first value is reached before the next time the electrical component is detected to switch from the passive state to the active state, to maintain this first potential difference value provided the electrical component is in the passive state.