A method of controlling heating in an aerosol-generating system (100) comprising a heater (119), the method comprising: a first control step in which a predetermined power is provided to the heater (119) and the resistance of the heater (119) is determined, wherein the determined resistance is indicative of the heater's temperature; monitoring for a predetermined condition and upon detection of the predetermined condition, recording the resistance of the heater (119); determining a target resistance (RT) corresponding to a target temperature of the heater (119) based on the recorded resistance; and a second control step in which the power provided to the heater (119) is controllably adapted to drive the resistance of the heater (119) towards the target resistance (RT) such that the heater (119) is driven towards a target temperature corresponding to the target resistance (RT).L'invention concerne un procédé de commande de chauffage dans un système de génération d'aérosol (100) comprenant un dispositif de chauffage (119), le procédé comprenant : une première étape de commande dans laquelle une puissance prédéterminée est fournie au dispositif de chauffage (119) et la résistance du dispositif de chauffage (119) est déterminée, la résistance déterminée indiquant la température du dispositif de chauffage ; la surveillance à la recherche d'une condition prédéterminée et lors de la détection de la condition prédéterminée, l'enregistrement de la résistance du dispositif de chauffage (119) ; la détermination d'une résistance cible (RT) correspondant à une température cible du dispositif de chauffage (119) en fonction de la résistance enregistrée ; et une deuxième étape de commande dans laquelle la puissance fournie au dispositif de chauffage (119) est adaptée par commande pour mener la résistance du dispositif de chauffage (119) vers la résistance cible (RT) de telle sorte que le dispositif de chauffage (119) est mené vers une température cible correspondant à la résistance