I want to know how to give multiple commands in "action.devices.EXECUTE" intent. This is to create an api to control fanspeed through google assistance.
I have tried the below code as request from postman, wanted to know whether this is in proper format.
{
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
"inputs": [{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [{
"devices": [{
"id": "5b0ef601a31d587588619851-newton-excited-51a284132eae42ba",
"customData": {
"fooValue": 74,
"barValue": true,
"bazValue": "lambtwirl"
}
}],
"execution": [{
"command": "action.devices.commands.OnOff",
"params": {
"on": true
}
},
{
"command": "action.devices.commands.SetFanSpeed",
"params": {
"fanSpeed": "s2"
}
}]
}]
}
}]
}
}
Here is the code