智能家居温控器指南
action.devices.types.THERMOSTAT
- 温控器是温度管理设备,具有设定点和模式。这与供暖器和空调装置区分开来,后者可能仅具有模式和设置(例如高/低),而非温度目标。
这种类型表示设备会获得温控器图标和一些 同义词和别名。
这种类型的设备控制温度,而一些供暖/制冷房间设备具有不同的 和高/低模式,但不包括温度控制。设备功能
请参阅相应的特征文档, 实现细节,例如您的服务应支持的属性和状态,以及如何 建立 EXECUTE 和 QUERY 响应。
必需的特征
如果适用于您的
设备。如果您的设备不支持这些特征,请输入
functionNotSupported
(在 QUERY 或 EXECUTE 响应中)。请参阅
错误和异常。
温控器命令经常串联在 EXECUTE
intent 中。用户
说 *将供暖温度设为 72 度* 会生成模式命令,后跟温度设置。
质量要求
- 延迟时间:必须小于或等于 700 毫秒。
- 可靠性:必须大于或等于 97%。
示例设备:简易温控器
本部分包含表示常见“温控器”的 intent 载荷示例 。如果您在实现中添加或移除 trait, 对您的回答进行相应的修改,以反映这些修改。
SYNC 响应示例
{ "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 } } ] } }
ThermostatTemperatureSetRange
有关命令参数的更多详情
请参阅
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 } } ] } }
设备错误
查看完整列表 错误和异常。inHeatOrCool
- 由于设备已开启,因此供暖/制冷/范围命令失败 以明确表示制热或制冷。inHeatCool
- 供暖或制冷命令失败,因为设备处于高温或 很好。lockedToRange
- 设备已锁定到某个温度范围或模式,并且 不能进行所请求的更改。rangeTooClose
- 适温范围内的温度值太接近 相互交流。