Panduan Unit Pengatur Suhu Smart Home
action.devices.types.AC_UNIT
- Unit AC mirip dengan termostat, tetapi tidak mendukung pemanas dan mungkin tidak mendukung setelan target suhu.
Jenis ini menunjukkan bahwa perangkat mendapatkan ikon Unit Pendingin Udara dan beberapa sinonim dan alias terkait.
Kemampuan perangkat
Lihat dokumentasi karakteristik yang sesuai untuk mengetahui detail penerapan, seperti atribut dan status yang harus didukung layanan Anda, serta cara mem-build respons EXECUTE dan QUERY.
Sifat yang diperlukan
Ciri dan perintah ini diperlukan, jika berlaku untuk
perangkat Anda. Jika perangkat Anda tidak mendukung karakteristik ini, masukkan kode error
functionNotSupported
dalam respons QUERY atau EXECUTE. Lihat
Error dan pengecualian untuk mengetahui info selengkapnya.
Persyaratan kualitas
- Latensi: harus kurang dari atau sama dengan 1.000 md.
- Keandalan: harus lebih besar dari atau sama dengan 97%.
Contoh perangkat: Unit AC sederhana
Bagian ini berisi contoh payload intent yang mewakili "Unit Pendingin Udara" umum berdasarkan jenis dan karakteristik perangkat di atas. Jika Anda menambahkan atau menghapus karakteristik dalam penerapan, ubah respons Anda agar sesuai dengan perubahan tersebut.
Contoh respons SYNC
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.AC_UNIT", "traits": [ "action.devices.traits.FanSpeed", "action.devices.traits.OnOff", "action.devices.traits.TemperatureSetting" ], "name": { "name": "Simple AC unit" }, "willReportState": true, "attributes": { "availableFanSpeeds": { "speeds": [ { "speed_name": "low_key", "speed_values": [ { "speed_synonym": [ "Low", "Slow" ], "lang": "en" } ] }, { "speed_name": "high_key", "speed_values": [ { "speed_synonym": [ "High", "Speed 2" ], "lang": "en" } ] } ], "ordered": true }, "availableThermostatModes": [ "off", "cool", "fan-only", "on" ], "thermostatTemperatureUnit": "C" }, "deviceInfo": { "manufacturer": "smart-home-inc", "model": "hs1234", "hwVersion": "3.2", "swVersion": "11.4" } } ] } }
Contoh respons QUERY
{ "requestId": "6894439706274654514", "inputs": [ { "intent": "action.devices.QUERY", "payload": { "devices": [ { "id": "123" } ] } } ] }
{ "requestId": "6894439706274654514", "payload": { "devices": { "123": { "status": "SUCCESS", "online": true, "on": true, "currentFanSpeedSetting": "low_key", "thermostatMode": "cool", "thermostatTemperatureAmbient": 25, "thermostatTemperatureSetpoint": 20 } } } }
Contoh perintah EXECUTE
SetFanSpeed
Untuk detail tambahan tentang parameter perintah,
lihat referensi
action.devices.traits.FanSpeed
.
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.SetFanSpeed", "params": { "fanSpeed": "high_key" } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "currentFanSpeedSetting": "high_key" } } ] } }
OnOff
Untuk detail tambahan tentang parameter perintah,
lihat referensi
action.devices.traits.OnOff
.
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.OnOff", "params": { "on": true } } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "on": true } } ] } }
ThermostatTemperatureSetpoint
Untuk detail tambahan tentang parameter perintah,
lihat referensi
action.devices.traits.TemperatureSetting
.
{ "requestId": "6894439706274654520", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.ThermostatTemperatureSetpoint", "params": { "thermostatTemperatureSetpoint": 22 } } ] } ] } } ] }
{ "requestId": "6894439706274654520", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "thermostatMode": "cool", "thermostatTemperatureSetpoint": 22, "thermostatTemperatureAmbient": 25.1 } } ] } }
ThermostatSetMode
Untuk detail tambahan tentang parameter perintah,
lihat referensi
action.devices.traits.TemperatureSetting
.
{ "requestId": "6894439706274654522", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.ThermostatSetMode", "params": { "thermostatMode": "cool" } } ] } ] } } ] }
{ "requestId": "6894439706274654522", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "thermostatMode": "cool", "thermostatTemperatureSetpoint": 22, "thermostatTemperatureAmbient": 25.1 } } ] } }