Para cambiar el modo del termostato a HEAT, COOL o HEATCOOL, usa el comando SetMode del rasgo ThermostatMode.
Este comando afecta otros rasgos según el estado actual del modo Eco o los cambios que se realicen en él:
Si el modo Eco está DESACTIVADO, el modo del termostato se establecerá de forma predeterminada en el último modo estándar (CALOR, FRÍO, CALORFRÍO o APAGADO) que estuvo activo.
Es posible que se muestren los siguientes códigos de error relacionados con este atributo:
Mensaje de error
RPC
Solución de problemas
No se permite el comando en el modo actual del termostato.
FAILED_PRECONDITION
Según el rasgo ThermostatMode , algunos modelos de termostatos no admiten el cambio del modo Eco cuando el modo del termostato está APAGADO. El modo del termostato debe cambiarse a HEAT, COOL o HEATCOOL antes de cambiar el modo Eco.
No se permite el comando cuando el termostato está en modo MANUAL_ECO.
FAILED_PRECONDITION
No se puede establecer el punto de ajuste de temperatura cuando el termostato está en modo Eco manual.
[null,null,["Última actualización: 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"]]