[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-29 (世界標準時間)。"],[[["\u003cp\u003eThe \u003ccode\u003esdm.devices.traits.ThermostatTemperatureSetpoint\u003c/code\u003e trait allows you to get and set the target temperature(s) for Nest thermostats in HEAT, COOL, and HEATCOOL modes using Celsius.\u003c/p\u003e\n"],["\u003cp\u003eGET requests retrieve the current target temperature(s) based on the thermostat's current mode, returning \u003ccode\u003eheatCelsius\u003c/code\u003e for HEAT and HEATCOOL, and \u003ccode\u003ecoolCelsius\u003c/code\u003e for COOL and HEATCOOL.\u003c/p\u003e\n"],["\u003cp\u003eYou can use commands like \u003ccode\u003eSetHeat\u003c/code\u003e, \u003ccode\u003eSetCool\u003c/code\u003e, and \u003ccode\u003eSetRange\u003c/code\u003e to change the target temperature(s), ensuring the thermostat is in the corresponding mode before sending the command.\u003c/p\u003e\n"],["\u003cp\u003eTemperature setpoints are specified in Celsius only and cannot be changed when the thermostat is in Eco or manual Eco mode.\u003c/p\u003e\n"],["\u003cp\u003eWhen setting a temperature range in HEATCOOL mode, ensure \u003ccode\u003eheatCelsius\u003c/code\u003e is lower than \u003ccode\u003ecoolCelsius\u003c/code\u003e to avoid errors.\u003c/p\u003e\n"]]],["The `ThermostatTemperatureSetpoint` trait for Nest thermostats manages target temperatures. It uses `heatCelsius` and `coolCelsius` fields for HEAT and COOL modes, or both for HEATCOOL. A GET request returns the current temperature set for the active mode. To change setpoints, use `SetHeat`, `SetCool`, or `SetRange` commands, ensuring the thermostat is in the corresponding mode (HEAT, COOL, or HEATCOOL). Setpoint adjustments can be rejected in Eco mode or if `coolCelsius` is not greater than `heatCelsius`.\n"],null,["\u003cbr /\u003e\n\nThermostatTemperatureSetpoint Schema\n\n[Nest Thermostat](/nest/device-access/api/thermostat)\n\n`sdm.devices.traits.ThermostatTemperatureSetpoint`\n\nThis trait belongs to device types of THERMOSTAT that support setting target temperature and temperature range.\n\n\u003cbr /\u003e\n\nFields\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| **Note:** A GET request for this trait only returns the current mode's temperature value(s).\n\n\u003cbr /\u003e\n\n| Field | Description | Data Type |\n|---------------|-----------------------------------------------------------------------|------------------------|\n| `heatCelsius` | Target temperature in Celsius for thermostat HEAT and HEATCOOL modes. | `number` Example: 20.0 |\n| `coolCelsius` | Target temperature in Celsius for thermostat COOL and HEATCOOL modes. | `number` Example: 22.0 |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nSample GET request and response - HEAT \n\nRequest \n\n```\nGET /enterprises/project-id/devices/device-id\n```\n\nResponse \n\n {\n \"name\" : \"enterprises/project-id/devices/device-id\",\n \"traits\" : {\n \"sdm.devices.traits.ThermostatTemperatureSetpoint\" : {\n \"heatCelsius\" : 20.0,\n }\n }\n }\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nSample GET request and response - COOL \n\nRequest \n\n```\nGET /enterprises/project-id/devices/device-id\n```\n\nResponse \n\n {\n \"name\" : \"enterprises/project-id/devices/device-id\",\n \"traits\" : {\n \"sdm.devices.traits.ThermostatTemperatureSetpoint\" : {\n \"coolCelsius\" : 22.0\n }\n }\n }\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nSample GET request and response - HEATCOOL \n\nRequest \n\n```\nGET /enterprises/project-id/devices/device-id\n```\n\nResponse \n\n {\n \"name\" : \"enterprises/project-id/devices/device-id\",\n \"traits\" : {\n \"sdm.devices.traits.ThermostatTemperatureSetpoint\" : {\n \"heatCelsius\" : 20.0,\n \"coolCelsius\" : 22.0\n }\n }\n }\n\n\u003cbr /\u003e\n\nCommands\n\nThe thermostat must be in the mode that corresponds to the command being called prior to changing\nthe temperature setpoints. The command and field(s) to change the setpoint(s) varies by thermostat\nmode.\n\nFor example, to issue the\n\nSetHeat\ncommand, the thermostat must be in HEAT mode first:\n\n| Mode | Command | Field(s) |\n|----------|----------------------------------------------------------------------------------------|------------------------------|\n| HEAT | [SetHeat](/nest/device-access/traits/device/thermostat-temperature-setpoint#setheat) | `heatCelsius` |\n| COOL | [SetCool](/nest/device-access/traits/device/thermostat-temperature-setpoint#setcool) | `coolCelsius` |\n| HEATCOOL | [SetRange](/nest/device-access/traits/device/thermostat-temperature-setpoint#setrange) | `heatCelsius`, `coolCelsius` |\n\nNote that the setpoint commands only take degrees in Celsius as a parameter, though the\nGoogle Nest Thermostat can display temperature in either degrees Celsius or Fahrenheit.\n| All Set\\* commands will be rejected if the thermostat is in Eco mode. See the [ThermostatEco](/nest/device-access/traits/device/thermostat-eco) trait for more information.\n\n\u003cbr /\u003e\n\nSetHeat\n\nSets the target temperature when the thermostat is in HEAT mode.\n\nSetHeat request and response \n\nRequest \n\n POST /enterprises/project-id/devices/device-id:executeCommand\n {\n \"command\" : \"sdm.devices.commands.ThermostatTemperatureSetpoint.SetHeat\",\n \"params\" : {\n \"heatCelsius\" : 22.0\n }\n }\n\nResponse \n\n```\n{}\n```\n\nSetHeat request fields\n\n| Field | Description | Data Type |\n|---------------|--------------------------------------------------------------------|------------------------|\n| `heatCelsius` | The target temperature to set when the thermostat is in HEAT mode. | `number` Example: 22.0 |\n\nSetCool\n\nSets the target temperature when the thermostat is in COOL mode.\n\nSetCool request and response \n\nRequest \n\n POST /enterprises/project-id/devices/device-id:executeCommand\n {\n \"command\" : \"sdm.devices.commands.ThermostatTemperatureSetpoint.SetCool\",\n \"params\" : {\n \"coolCelsius\" : 20.0\n }\n }\n\nResponse \n\n```\n{}\n```\n\nSetCool request fields\n\n| Field | Description | Data Type |\n|---------------|--------------------------------------------------------------------|------------------------|\n| `coolCelsius` | The target temperature to set when the thermostat is in COOL mode. | `number` Example: 20.0 |\n\nSetRange\n\nSets the minimum and maximum temperatures when the thermostat is in HEATCOOL mode.\n\nSetRange request and response \n\nRequest \n\n POST /enterprises/project-id/devices/device-id:executeCommand\n {\n \"command\" : \"sdm.devices.commands.ThermostatTemperatureSetpoint.SetRange\",\n \"params\" : {\n \"heatCelsius\" : 20.0,\n \"coolCelsius\" : 22.0\n }\n }\n\nResponse \n\n```\n{}\n```\n\nSetRange request fields\n\n| Field | Description | Data Type |\n|---------------|--------------------------------------------------------------------------------|------------------------|\n| `heatCelsius` | The minimum target temperature to set when the thermostat is in HEATCOOL mode. | `number` Example: 20.0 |\n| `coolCelsius` | The maximum target temperature to set when the thermostat is in HEATCOOL mode. | `number` Example: 22.0 |\n\n\u003cbr /\u003e\n\n\nErrors\n\nThe following error code(s) may be returned in relation to this trait:\n\n| Error Message | RPC | Troubleshooting |\n|---------------------------------------------------------|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Command not allowed in current thermostat mode. | `FAILED_PRECONDITION` | Some thermostat models do not support changing the Eco mode when the thermostat mode is OFF, according to the [ThermostatMode](/nest/device-access/traits/device/thermostat-mode) trait. The thermostat mode must be changed to HEAT, COOL, or HEATCOOL prior to changing the Eco mode. |\n| Cool value must be greater than heat value. | `INVALID_ARGUMENT` | Make sure that the `heatCelsius` field is less than the `coolCelsius` field in your command. |\n| Command not allowed when thermostat in MANUAL_ECO mode. | `FAILED_PRECONDITION` | The temperature setpoint cannot be set when the thermostat is in manual Eco mode. |\n\nSee the [API Error Code Reference](/nest/device-access/reference/errors/api) for\nthe full list of API error codes.\n\n\u003cbr /\u003e"]]