Last Updated on : 2024-01-11 05:55:16download
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
{
"tid": "ba2a6a487d3a11ee82c7664ef4d3e193",
"result": [
{
"enabled": true,
"automation_id": "rQdsfx****sDO6ON",
"background": "",
"preconditions": [
],
"name": "Control the Light Based on Weather",
"match_type": 1,
"conditions": [
{
"display": {
"code": "condition",
"operator": "==",
"value": "sunny"
},
"entity_id": "100180366****73213",
"entity_type": 3,
"order_num": 1
}
],
"actions": [
{
"entity_id": "6856054****62e90e",
"executor_property": {
"bright_value": 25
},
"action_executor": "dpIssue"
}
]
}
],
"t": 1699340168087,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback