Para mudar o modo do termostato para HEAT, COOL ou HEATCOOL, use o comando SetMode da característica ThermostatMode.
Esse comando afeta outros traços com base no status atual ou nas mudanças no modo econômico:
Se o modo Eco estiver DESATIVADO, o modo do termostato será definido como o último modo padrão (AQUECER, RESFRIAR, AQUECER • RESFRIAR ou DESATIVADO) que estava ativo.
Os seguintes códigos de erro podem ser retornados em relação a esse traço:
Mensagem de erro
RPC
Solução de problemas
O comando não é permitido no modo atual do termostato.
FAILED_PRECONDITION
Alguns modelos de termostato não permitem mudar o modo Eco quando o modo do termostato está DESATIVADO, de acordo com a característica ThermostatMode . O modo do termostato precisa ser mudado para AQUECER, RESFRIAR ou AQUECERRESFRIAR antes de mudar o modo econômico.
O comando não é permitido quando o termostato está no modo MANUAL_ECO.
FAILED_PRECONDITION
Não é possível definir o ponto de ajuste de temperatura quando o termostato está no modo Eco manual.
[null,null,["Última atualização 2025-07-29 UTC."],[[["\u003cp\u003eThe \u003ccode\u003esdm.devices.traits.ThermostatEco\u003c/code\u003e trait applies to Nest thermostats that support Eco modes, enabling control over energy-saving settings.\u003c/p\u003e\n"],["\u003cp\u003eThis trait allows retrieval of the thermostat's current Eco mode, available modes, and temperature thresholds for heating and cooling in Eco mode.\u003c/p\u003e\n"],["\u003cp\u003eYou can use the \u003ccode\u003eSetMode\u003c/code\u003e command to change the Eco mode of the thermostat to \u003ccode\u003eMANUAL_ECO\u003c/code\u003e or \u003ccode\u003eOFF\u003c/code\u003e, impacting other thermostat behaviors.\u003c/p\u003e\n"],["\u003cp\u003eCertain thermostat models may require the thermostat mode to be set to HEAT, COOL, or HEATCOOL before allowing changes to the Eco mode.\u003c/p\u003e\n"],["\u003cp\u003eWhile in \u003ccode\u003eMANUAL_ECO\u003c/code\u003e mode, temperature setpoints cannot be adjusted and are not returned by the ThermostatTemperatureSetpoint trait.\u003c/p\u003e\n"]]],["The `ThermostatEco` trait manages a thermostat's Eco modes, which can be either \"MANUAL_ECO\" or \"OFF\". It details the `availableModes`, `mode`, `heatCelsius` (lowest heating temperature), and `coolCelsius` (highest cooling temperature). The `SetMode` command changes the Eco mode. In MANUAL_ECO mode, temperature setpoint changes are not allowed, and commands related to that are rejected. When in OFF mode, the thermostat defaults to the last active standard mode. Some models require switching to HEAT, COOL, or HEATCOOL before changing Eco mode.\n"],null,["\u003cbr /\u003e\n\nThermostatEco Schema\n====================\n\n[Nest Thermostat](/nest/device-access/api/thermostat)\n\n`sdm.devices.traits.ThermostatEco`\n\nThis trait belongs to device types of THERMOSTAT that support ECO modes.\n\n\u003cbr /\u003e\n\nFields\n------\n\n\n| Field | Description | Data Type |\n|------------------|------------------------------------------------------------------------------------|------------------------------------------------|\n| `availableModes` | List of supported Eco modes. | `array(string)` Value: \\[\"MANUAL_ECO\", \"OFF\"\\] |\n| `mode` | The current Eco mode of the thermostat. | `string` Values: \"MANUAL_ECO\", \"OFF\" |\n| `heatCelsius` | Lowest temperature in Celsius at which the thermostat begins heating in Eco mode. | `number` Example: 20.0 |\n| `coolCelsius` | Highest temperature in Celsius at which the thermostat begins cooling in Eco mode. | `number` Example: 22.0 |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n#### Sample GET request and response\n\n### Request\n\n```\nGET /enterprises/project-id/devices/device-id\n```\n\n### Response\n\n {\n \"name\" : \"enterprises/project-id/devices/device-id\",\n \"traits\" : {\n \"sdm.devices.traits.ThermostatEco\" : {\n \"availableModes\" : [\"MANUAL_ECO\", \"OFF\"],\n \"mode\" : \"MANUAL_ECO\",\n \"heatCelsius\" : 20.0,\n \"coolCelsius\" : 22.0\n }\n }\n }\n\n\u003cbr /\u003e\n\nCommands\n--------\n\n\u003cbr /\u003e\n\n### SetMode\n\nChange the thermostat Eco mode.\n\n\u003cbr /\u003e\n\nTo change the thermostat mode to HEAT, COOL, or HEATCOOL, use the [SetMode](/nest/device-access/traits/device/thermostat-mode#setmode) command of the ThermostatMode trait.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nThis command impacts other traits, based on the current status of, or changes to, the Eco mode:\n\n- If Eco mode is OFF, the thermostat mode will default to the last standard mode (HEAT, COOL, HEATCOOL, or OFF) that was active.\n- If Eco mode is MANUAL_ECO:\n - Commands for the [ThermostatTemperatureSetpoint](/nest/device-access/traits/device/thermostat-temperature-setpoint) trait are rejected.\n - Temperature setpoints are not returned by the [ThermostatTemperatureSetpoint](/nest/device-access/traits/device/thermostat-temperature-setpoint) trait.\n\n\u003cbr /\u003e\n\n| 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\n#### SetMode request and response\n\n### Request\n\n POST /enterprises/project-id/devices/device-id:executeCommand\n {\n \"command\" : \"sdm.devices.commands.ThermostatEco.SetMode\",\n \"params\" : {\n \"mode\" : \"MANUAL_ECO\"\n }\n }\n\n### Response\n\n```\n{}\n```\n\n#### SetMode request fields\n\n| Field | Description | Data Type |\n|--------|-------------------------------------------|--------------------------------------|\n| `mode` | The Eco mode to change the thermostat to. | `string` Values: \"MANUAL_ECO\", \"OFF\" |\n\n\u003cbr /\u003e\n\n\nErrors\n------\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| 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"]]