string القيم: "HEAT" أو "COOL" أو "HEATCOOL" أو "OFF"
الأخطاء
قد يتم عرض رموز الخطأ التالية في ما يتعلق بهذه السمة:
رسالة الخطأ
متوسط عائد النقرة
تحديد المشاكل وحلّها
لا يُسمح بتنفيذ الأمر في وضع الترموستات الحالي.
FAILED_PRECONDITION
لا تتيح بعض طُرز الترموستات تغيير الوضع الاقتصادي عندما يكون وضع الترموستات OFF، وذلك وفقًا لسمة ThermostatMode . يجب تغيير وضع الترموستات إلى HEAT أو COOL أو HEATCOOL قبل تغيير وضع درجات الحرارة الاقتصادية.
تاريخ التعديل الأخير: 2025-07-29 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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.ThermostatMode\u003c/code\u003e trait allows you to interact with the thermostat mode (HEAT, COOL, HEATCOOL, OFF) of compatible Nest Thermostat devices.\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve the available and current thermostat modes using a GET request to the device's endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSetMode\u003c/code\u003e command allows you to change the thermostat mode to a desired value by sending a POST request.\u003c/p\u003e\n"],["\u003cp\u003eEco modes are managed separately through the \u003ccode\u003eThermostatEco\u003c/code\u003e trait and not through this trait.\u003c/p\u003e\n"],["\u003cp\u003eCertain thermostat models may have limitations on changing the Eco mode while the thermostat mode is OFF, requiring a switch to HEAT, COOL, or HEATCOOL first.\u003c/p\u003e\n"]]],[],null,["\u003cbr /\u003e\n\nThermostatMode Schema\n\n[Nest Thermostat](/nest/device-access/api/thermostat)\n\n`sdm.devices.traits.ThermostatMode`\n\nThis trait belongs to device types of THERMOSTAT that support different thermostat modes.\n\n\u003cbr /\u003e\n\nFields\n\n\n| Field | Description | Data Type |\n|------------------|-------------------------------------|--------------------------------------------------------------|\n| `availableModes` | List of supported thermostat modes. | `array(string)` Value: \\[\"HEAT\", \"COOL\", \"HEATCOOL\", \"OFF\"\\] |\n| `mode` | The current thermostat mode. | `string` Values: \"HEAT\", \"COOL\", \"HEATCOOL\", \"OFF\" |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nSample GET request and response \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.ThermostatMode\" : {\n \"availableModes\" : [\"HEAT\", \"COOL\", \"HEATCOOL\", \"OFF\"],\n \"mode\" : \"COOL\"\n }\n }\n }\n\n\u003cbr /\u003e\n\nCommands\n\n\u003cbr /\u003e\n\nSetMode\n\nChange the thermostat mode.\n\n\u003cbr /\u003e\n\n| This trait does not work with Eco modes. See the [ThermostatEco](/nest/device-access/traits/device/thermostat-eco) trait for more information.\n\n\u003cbr /\u003e\n\nSetMode request and response \n\nRequest \n\n POST /enterprises/project-id/devices/device-id:executeCommand\n {\n \"command\" : \"sdm.devices.commands.ThermostatMode.SetMode\",\n \"params\" : {\n \"mode\" : \"HEAT\"\n }\n }\n\nResponse \n\n```\n{}\n```\n\nSetMode request fields\n\n| Field | Description | Data Type |\n|--------|---------------------------------------|----------------------------------------------------|\n| `mode` | The mode to change the thermostat to. | `string` Values: \"HEAT\", \"COOL\", \"HEATCOOL\", \"OFF\" |\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 trait. The thermostat mode must be changed to HEAT, COOL, or HEATCOOL prior to changing the 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"]]