Last Updated on : 2023-09-15 01:52:10download
Based on the home ID, query a list of automation scenes in the specified home.
GET: /v1.0/homes/{home_id}/automations
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
home_id | String | uri | true | The home ID. |
Parameter name | Type | Description |
---|---|---|
result | List | The returned result. |
Description of result
Parameter name | Type | Description |
---|---|---|
automation_id | String | The ID of the specified automation scene. |
name | String | The name of the specified automation scene. |
background | String | The background image. |
preconditions | List | The precondition. |
conditions | List | The linkage condition. |
actions | List | The executed actions. |
match_type | Integer | Indicates the matching types. Valid values:
|
condition_rule | String | The custom condition rule. |
enabled | Boolean | Indicates whether to enable a rule. |
Description of preconditions
Parameter name | Type | Description |
---|---|---|
id | String | The condition ID. |
cond_type | String | The type of condition. |
display | String | Shows the conditions. |
Description of conditions
Parameter name | Type | Description |
---|---|---|
entity_type | Integer | The type of condition. |
entity_id | String | The entity ID. It could be a device ID, weather, or temperature. |
display | String | Shows the conditions. |
order_num | Integer | The sequence. |
Description of actions
Parameter name | Type | Description |
---|---|---|
entity_id | String | The entity ID. It could be a device ID, weather, or temperature. |
executor_property | String | The property that triggers an action. |
action_executor | String | The type of the action. |
GET: /v1.0/homes/242****/automations
{
"result":[
{
"actions":[
{
"action_executor":"delay",
"executor_property":{
"hours":"0",
"minutes": "0",
"seconds": "5"
}
},
{
"action_executor":"dpIssue",
"entity_id":"vdevo157259825422***",
"executor_property":{
"switch_1":true
}
},
{
"action_executor":"externalAction",
"executor_property":{
// Subject to your customization
}
}
],
"automation_id":"p2aWOkEOe2RzA***",
"background":"https://images.tuyacn.com/smart/rule/cover/bedr***.png",
"conditions":[
{
"display":{
"code":"switch_1",
"operator":"==",
"value":true
},
"entity_id":"vdevo157259825422***",
"entity_type":1,
"order_num":1
}
],
"enabled": true,
"status": "1",
"match_type":1,
"name":"Automation Test"
},
{
"automation_id":"L07BQVabdqwFP***",
"background":"https://images.tuyacn.com/smart/rule/cover/hou***.png",
"conditions":[
{
"display":{
"code":"battery_percentage",
"operator":"<",
"value":255
},
"entity_id":"vdevo156958314001***",
"entity_type":1,
"order_num":1
},
{
"display":{
"code":"mode",
"operator":"==",
"value":1
},
"entity_id":"weqszcaokqlmlkmlcanqklwokl***",
"entity_type":15,
"order_num":2
}
],
"enabled": true,
"match_type":1,
"name":"Automation Test 1"
}
],
"success":true,
"t":1572936751228
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback