智慧型住宅溫度控制器指南
action.devices.types.THERMOSTAT
- 溫度控制器是溫度設定裝置,包含設定點和模式。這會將其與暖氣和空調設備分開,它們可能只有模式和設定 (例如高/低) 和溫度目標。
這個類型表示裝置會得到溫度控制器圖示以及部分相關的同義詞與別名。
這種類型的控制溫度可控制部分溫度,而部分冷暖氣系統的溫度控制方式不同,高溫和低溫模式也不同,但沒有溫度控制項。裝置功能
請參閱對應的特性說明文件,瞭解服務應支援的屬性和狀態,以及如何建構 EXECUTE 和 QUERY 回應。
必修特色
這些特性和指令 (如果適用於您的裝置)。
溫度控制器指令經常鏈結在 EXECUTE
的意圖中。當使用者 *將暖氣設為 27 度*
品質規定
- 延遲時間:必須小於或等於 700 毫秒。
- 可靠性:必須大於或等於 97%。
裝置範例:簡易溫度控制器
本節包含代表上述裝置類型和特徵的意圖意圖酬載,代表常見的「溫度控制器」如果您在實作中新增或移除特性,請配合這些異動修改回應。
同步處理回應範例
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.THERMOSTAT", "traits": [ "action.devices.traits.TemperatureSetting" ], "name": { "name": "Simple thermostat" }, "willReportState": true, "attributes": { "availableThermostatModes": [ "off", "heat", "cool", "heatcool", "on" ], "thermostatTemperatureRange": { "minThresholdCelsius": 15, "maxThresholdCelsius": 30 }, "thermostatTemperatureUnit": "F" }, "deviceInfo": { "manufacturer": "smart-home-inc", "model": "hs1234", "hwVersion": "3.2", "swVersion": "11.4" } } ] } }
QUERY 回應範例
{ "requestId": "6894439706274654514", "inputs": [ { "intent": "action.devices.QUERY", "payload": { "devices": [ { "id": "123" } ] } } ] }
{ "requestId": "6894439706274654514", "payload": { "devices": { "123": { "status": "SUCCESS", "online": true, "thermostatMode": "cool", "thermostatTemperatureSetpoint": 23, "thermostatTemperatureAmbient": 25.1, "thermostatHumidityAmbient": 45.3 } } } }
EXECUTE 指令範例
ThermostatTemperatureSetpoint
如要進一步瞭解指令參數,請參閱 action.devices.traits.TemperatureSetting
參考資料。
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.ThermostatTemperatureSetpoint", "params": { "thermostatTemperatureSetpoint": 22 } } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "thermostatMode": "cool", "thermostatTemperatureSetpoint": 22, "thermostatTemperatureAmbient": 25.1 } } ] } }
溫度控制器溫度範圍
如要進一步瞭解指令參數,請參閱 action.devices.traits.TemperatureSetting
參考資料。
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.ThermostatTemperatureSetRange", "params": { "thermostatTemperatureSetpointHigh": 26, "thermostatTemperatureSetpointLow": 22 } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "thermostatMode": "heatcool", "thermostatTemperatureSetpointHigh": 26, "thermostatTemperatureSetpointLow": 22, "thermostatTemperatureAmbient": 25.1 } } ] } }
ThermostatSetMode
如要進一步瞭解指令參數,請參閱 action.devices.traits.TemperatureSetting
參考資料。
{ "requestId": "6894439706274654520", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.ThermostatSetMode", "params": { "thermostatMode": "heatcool" } } ] } ] } } ] }
{ "requestId": "6894439706274654520", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "thermostatMode": "heatcool", "thermostatTemperatureSetpointHigh": 26, "thermostatTemperatureSetpointLow": 22, "thermostatTemperatureAmbient": 25.1 } } ] } }
裝置錯誤:ERRORS
請參閱錯誤和例外狀況的完整清單。inHeatOrCool
- 裝置處於 熱 • 冷或冷氣,因此暖氣/冷氣/指令指令失敗。inHeatCool
- 裝置過熱或冷卻,因此無法使用熱源或冷氣指令。lockedToRange
- 裝置已鎖定在溫度範圍或模式中,且無法進行要求的變更。rangeTooClose
- 熱 • 溫度範圍的溫度點彼此距離太近。