Panduan Shower Smart Home
action.devices.types.SHOWER
- Pancuran dapat diaktifkan dan dinonaktifkan serta dapat mendukung penyesuaian suhu.
Jenis ini menunjukkan bahwa perangkat mendapatkan ikon Shower serta beberapa sinonim dan alias yang terkait.
Kemampuan perangkat
Lihat dokumentasi fitur yang sesuai untuk detail penerapan, seperti atribut dan status yang harus didukung layanan Anda, serta cara membuat respons EXECUTE dan QUERY.
Trait yang direkomendasikan
Trait ini direkomendasikan, jika sesuai untuk perangkat Anda. Namun, Anda bebas memadupadankan semua karakteristik yang tersedia agar cocok dengan fungsi produk yang ada.
Persyaratan kualitas
- Latensi: harus kurang dari atau sama dengan 800 md.
- Keandalan: harus lebih dari atau sama dengan 97%.
Contoh perangkat: Pancuran simpel
Bagian ini berisi contoh payload intent yang merepresentasikan "Shower" umum berdasarkan jenis dan karakteristik perangkat di atas. Jika Anda menambahkan atau menghapus trait dalam implementasi Anda, ubah respons tersebut agar mencerminkan perubahan tersebut.
Contoh respons SYNC
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.SHOWER", "traits": [ "action.devices.traits.TemperatureControl", "action.devices.traits.StartStop" ], "name": { "name": "Simple shower" }, "willReportState": true, "attributes": { "temperatureRange": { "minThresholdCelsius": 25, "maxThresholdCelsius": 100 }, "temperatureUnitForUX": "F" }, "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, "isRunning": true, "temperatureSetpointCelsius": 30 } } } }
Contoh perintah EXECUTE
SetTemperature
Untuk detail tambahan tentang parameter perintah,
lihat referensi
action.devices.traits.TemperatureControl
.
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.SetTemperature", "params": { "temperature": 45 } } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "temperatureSetpointCelsius": 45 } } ] } }
StartStop
Untuk detail tambahan tentang parameter perintah,
lihat referensi
action.devices.traits.StartStop
.
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.StartStop", "params": { "start": true } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "isRunning": true } } ] } }