nest.class.php
public function temperatureInUserScale($temperature_in_celsius, $serial_number = NULL) {
        $serial_number = $this->getDefaultSerial($serial_number);
        $temp_scale = $this->getDeviceTemperatureScale($serial_number);
        if ($temp_scale == 'F') {
            return ($temperature_in_celsius * 1.8) + 32;
        }
        return $temperature_in_celsius;
    }
public function temperatureInUserScale($temperature_in_celsius, $serial_number = NULL) {
        $serial_number = $this->getDefaultSerial($serial_number);
        $temp_scale = $this->getDeviceTemperatureScale($serial_number);
        if ($temp_scale == 'F') {
            return ($temperature_in_celsius * 1.8) + 32;
        }
        return $temperature_in_celsius;
    }
Convert a temperature value from Celsius to the device-preferred scale.

@param float  $temperature_in_celsius The temperature to convert.
@param string $serial_number          The thermostat serial number. Defaults to the first device of the account.

@return float Temperature in device-preferred scale.