Last Updated on : 2024-01-11 05:54:42download
Query the specified automation scene of the specified home.
GET: /v1.0/homes/{home_id}/automations/{automation_id}
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
home_id | String | uri | true | The home ID. |
automation_id | String | uri | true | The automation ID. |
Parameter name | Type | Description |
---|---|---|
result | AutomationRes | The returned result. |
Description of result
Parameter name | Type | Description |
---|---|---|
automation_id | String | The automation ID. |
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 | The matching type. Valid values:
|
condition_rule | String | Custom condition rules. This parameter is required when the value of match_type is 3 . The custom condition rules follow the AND OR formula. Each automation condition is identified by its order_num . |
enabled | Boolean | Indicates whether the feature is enabled. Valid values:
|
Description of preconditions
Parameter name | Type | Description |
---|---|---|
id | String | The condition ID. |
cond_type | String | Currently, you can only set the specified time period as a precondition. Valid value: timeCheck . |
display | Map | Show the conditions. |
Description of conditions
Parameter name | Type | Description |
---|---|---|
entity_type | Integer | The type of condition. The following types are supported. Valid values:
|
entity_id | String | The entity that performs the specified action.
|
display | Map | Show the conditions. |
order_num | Integer | The serial number of the specified condition, starting from 1 . |
Description of actions
Parameter name | Type | Description |
---|---|---|
entity_id | String | The entity ID. It could be a device ID, weather, or temperature. |
executor_property | Map | The property that triggers an action. |
action_executor | String | The type of action. Valid value: dpIssue . |
Description of display
Parameter name | Type | Description |
---|---|---|
display | String | Show the conditions. |
Description of executor_property
Parameter name | Type | Description |
---|---|---|
executor_property | String | The property that triggers an action. |
GET: /v1.0/homes/242****/automations/53IYSXI3gEn2****
{
"tid": "2dd4fae27d3b11ee82c7664ef4d3e193",
"result": {
"enabled": true,
"automation_id": "rQdsf****VsDO6ON",
"background": "",
"preconditions": [
],
"name": "Control the Light Based on Weather",
"match_type": 1,
"conditions": [
{
"expr_display": "Weather: Sunny",
"display": {
"code": "condition",
"operator": "==",
"value": "sunny"
},
"entity_id": "100180****567473213",
"entity_type": 3,
"order_num": 1
}
],
"actions": [
{
"entity_id": "6856054****eb62e90e",
"action_displayNew": {
"3": [
"Brightness",
"25"
]
},
"executor_property": {
"bright_value": 25
},
"action_executor": "dpIssue"
}
]
},
"t": 1699340362194,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback