Last Updated on : 2023-07-06 08:27:40download
Update a specified tap-to-run scene based on the tap-to-run ID. The maximum number of actions is 50
.
PUT: /v2.0/iot-03/scenes/{scene_id}
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
scene_id | String | uri | true | The ID of a tap-to-run scene. |
Description of body
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
name | String | true | The name of a specified tap-to-run scene. | |
dsl | SceneDsl | true | The language of tap-to-run rules. |
Description of dsl
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
actions | List | true | The list of tap-to-run actions. |
Description of actions
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
execution_type | String | true | The execution type.
| |
execution_rule | Object | true | The execution rule. See the details of execution_rule . |
Parameter name | Type | Description |
---|---|---|
result | Boolean | The returned result. Valid values:
|
PUT: /v2.0/iot-03/scenes/wukW5YYf561r****
{
"name": "This is a tap-to-run",
"dsl": {
"actions": [
{
"execution_type": "delay",
"execution_rule": {
"delay_seconds": 60
}
},
{
"execution_type": "deviceIssue",
"execution_rule": {
"execution_id": "vdevo16292691746****",
"function_code": "bright_value",
"function_value": 20
}
},
{
"execution_type": "deviceGroupIssue",
"execution_rule": {
"execution_id": "144790134147200****",
"function_code": "switch_1",
"function_value": true
}
}
]
}
}
{
"result": true,
"t": 1635844703309,
"success": true
}
For more information, see error code.
execution_rule
When execution_type
is delay
:
Parameter name | Type | Description | Required |
---|---|---|---|
delay_seconds | Long | The delay time. The value range is 1 to 5 × 60 × 60. Unit: second. | Yes |
When execution_type
is deviceIssue
or deviceGroupIssue
:
Parameter name | Type | Description | Required |
---|---|---|---|
execution_id | String | The ID of a specified device or device group. | Yes |
function_code | String | The instruction code of a device or device group. | Yes |
function_value | Object | The instruction value of a device or device group. | Yes |
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback