A thermostat device comprising: a housing; an electronic circuit board in the housing; a first temperature sensor disposed on the electronic circuit board in the housing and configured to sense a first temperature; and processing circuitry in the housing configured to: determine a current operating mode of the thermostat device out of a plurality of operating modes; characterised in that the processing circuitry in the housing is further configured to: determine that the thermostat device has had an operating mode change from a previous operating mode to the current operating mode; determine whether the electronic circuit board is heating up or cooling down in response to the operating mode change; in response to determining that the electronic circuit board is heating up, determine a heating dynamic factor ΔT for the first temperature sensed by the first temperature sensor based at least on a heating curve associated with the current operating mode; determine a point on the heating curve associated with the first temperature sensed by the first temperature sensor; determine the heating dynamic factor ΔT that corresponds to the point on the heating curve; and determine an ambient temperature outside the housing of the thermostat device as the first temperature sensed by the first temperature sensor minus the heating dynamic factor ΔT. a housing; an electronic circuit board in the housing; a first temperature sensor disposed on the electronic circuit board in the housing and configured to sense a first temperature; and processing circuitry in the housing configured to: determine a current operating mode of the thermostat device out of a plurality of operating modes; characterised in that the processing circuitry in the housing is further configured to: determine that the thermostat device has had an operating mode change from a previous operating mode to the current operating mode; determine whether the electronic circuit board is heating up or cooling down in response to the operating mode change; in response to determining that the electronic circuit board is heating up, determine a heating dynamic factor ΔT for the first temperature sensed by the first temperature sensor based at least on a heating curve associated with the current operating mode; determine a point on the heating curve associated with the first temperature sensed by the first temperature sensor; determine the heating dynamic factor ΔT that corresponds to the point on the heating curve; and determine an ambient temperature outside the housing of the thermostat device as the first temperature sensed by the first temperature sensor minus the heating dynamic factor ΔT. determine a current operating mode of the thermostat device out of a plurality of operating modes; characterised in that the processing circuitry in the housing is further configured to: determine that the thermostat device has had an operating mode change from a previous operating mode to the current operating mode; determine whether the electronic circuit board is heating up or cooling down in response to the operating mode change; in response to determining that the electronic circuit board is heating up, determine a heating dynamic factor ΔT for the first temperature sensed by the first temperature sensor based at least on a heating curve associated with the current operating mode; determine a point on the heating curve associated with the first temperature sensed by the first temperature sensor; determine the heating dynamic factor ΔT that corresponds to the point on the heating curve; and determine an ambient temperature outside the housing of the thermostat device as the first temperature sensed by the first temperature sensor minus the heating dynamic factor ΔT. determine that the thermostat device has had an operating mode change from a previous operating mode to the current operating mode; determine whether the electronic circuit board is heating up or cooling down in response to the operating mode change; in response to determining that the electronic circuit board is heating up, determine a heating dynamic factor ΔT for the first temperature sensed by the first temperature sensor based at least on a heating curve associated with the current operating mode; determine a point on the heating curve associated with the first temperature sensed by the first temperature sensor; determine the heating dynamic factor ΔT that corresponds to the point on the heating curve; and determine an ambient temperature outside the housing of the thermostat device as the first temperature sensed by the first temperature sensor minus the heating dynamic factor ΔT.