لتغيير وضع الترموستات إلى HEAT أو COOL أو HEATCOOL، استخدِم الأمر SetMode من السمة ThermostatMode.
يؤثر هذا الأمر في السمات الأخرى، استنادًا إلى الحالة الحالية لـ "وضع توفير الطاقة" أو التغييرات التي يتم إجراؤها عليه:
إذا كان "وضع درجات الحرارة الاقتصادية" غير مفعّل، سيتم ضبط وضع الترموستات تلقائيًا على آخر وضع عادي (تدفئة أو تبريد أو تدفئة وتبريد أو إيقاف) كان مفعّلاً.
إذا كان وضع "درجات الحرارة الاقتصادية" هو MANUAL_ECO:
وضع "درجات حرارة اقتصادية" الذي سيتم ضبط الترموستات عليه
string القيم: "MANUAL_ECO" أو "OFF"
الأخطاء
قد يتم عرض رموز الخطأ التالية في ما يتعلق بهذه السمة:
رسالة الخطأ
متوسط عائد النقرة
تحديد المشاكل وحلّها
لا يُسمح بتنفيذ الأمر في وضع الترموستات الحالي.
FAILED_PRECONDITION
لا تتيح بعض طُرز الترموستات تغيير الوضع الاقتصادي عندما يكون وضع الترموستات OFF، وذلك وفقًا لسمة ThermostatMode . يجب تغيير وضع الترموستات إلى HEAT أو COOL أو HEATCOOL قبل تغيير وضع درجات الحرارة الاقتصادية.
لا يُسمح بتنفيذ الأمر عندما يكون الترموستات في وضع MANUAL_ECO.
FAILED_PRECONDITION
لا يمكن ضبط نقطة ضبط درجة الحرارة عندما يكون الترموستات في وضع "درجات حرارة اقتصادية" اليدوي.
تاريخ التعديل الأخير: 2025-07-29 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-29 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\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"]]