A method of controlling power transfer (Q) of a thermal energy exchanger of an HVAC system , the method comprising: controlling (B2) by a control system the opening of a valve in the HVAC system to adjust a flow (Φ) of a fluid through the thermal energy exchanger by setting (S6) a control signal for the valve responsive to different setpoints (C); characterized in that the method further comprises: recording (S1) in the control system a plurality of data points (D*), each of the data points (D) including for a certain setpoint ( C D ) operating data values related to the power transfer ( Q̇ D ) effectuated by the thermal energy exchanger with the control signal for the valve set responsive to the certain setpoint ( C D ); determining (S2) by the control system of a fitting curve ( p F ) which fits the plurality of data points (D*); determining (S3) by the control system of a transformation which transforms the fitting curve ( p F ) into a transformed curve ( p T ) having a given target shape; and controlling (B2) by the control system the opening of the valve by transforming (S5) the setpoint ( C F ) to a transformed setpoint ( C T ), using the transformation, and setting the control signal for the valve based on the transformed setpoint ( C T ). controlling (B2) by a control system the opening of a valve in the HVAC system to adjust a flow (Φ) of a fluid through the thermal energy exchanger by setting (S6) a control signal for the valve responsive to different setpoints (C); characterized in that the method further comprises: recording (S1) in the control system a plurality of data points (D*), each of the data points (D) including for a certain setpoint ( C D ) operating data values related to the power transfer ( Q̇ D ) effectuated by the thermal energy exchanger with the control signal for the valve set responsive to the certain setpoint ( C D ); determining (S2) by the control system of a fitting curve ( p F ) which fits the plurality of data points (D*); determining (S3) by the control system of a transformation which transforms the fitting curve ( p F ) into a transformed curve ( p T ) having a given target shape; and controlling (B2) by the control system the opening of the valve by transforming (S5) the setpoint ( C F ) to a transformed setpoint ( C T ), using the transformation, and setting the control signal for the valve based on the transformed setpoint ( C T ). recording (S1) in the control system a plurality of data points (D*), each of the data points (D) including for a certain setpoint ( C D ) operating data values related to the power transfer ( Q̇ D ) effectuated by the thermal energy exchanger with the control signal for the valve set responsive to the certain setpoint ( C D ); determining (S2) by the control system of a fitting curve ( p F ) which fits the plurality of data points (D*); determining (S3) by the control system of a transformation which transforms the fitting curve ( p F ) into a transformed curve ( p T ) having a given target shape; and controlling (B2) by the control system the opening of the valve by transforming (S5) the setpoint ( C F ) to a transformed setpoint ( C T ), using the transformation, and setting the control signal for the valve based on the transformed setpoint ( C T ). <EOS>