{
"id":"59e6fab9-448f-26bb-b608-3566b716ff72",
"name": "222",
"description": "xxx",
"enabled": "Y",
"trigger_condition_groups": [
[
{
"trigger_conditions_type": "10",
"trigger_source": "设备id",
"trigger_param_type": "TEL",
"trigger_param": "temperature",
"trigger_operator": ">",
"trigger_value": "20"
}
],
[
{
"trigger_conditions_type": "11",
"trigger_source": "设备配置id",
"trigger_param_type": "TEL",
"trigger_param": "temperature",
"trigger_operator": ">",
"trigger_value": "20"
},
{
"trigger_conditions_type": "22",
"trigger_value": "137|22:01:00+08:00|23:00:00+08:00"
}
],
[
{
"execution_time": "2024-04-01T11:22:00Z",
"expiration_time": "2024-04-01T11:22:00Z"
}
],
[
{
"//": "时间条件-重复-东八区每小时22分0秒",
"task_type": "HOUR",
"params": "22:00+08:00"
}
],
[
{
"task_type": "DAY",
"params": "11:22:00+08:00"
}
],
[
{
"task_type": "WEEK",
"params": "123|11:22:00+07:00"
}
],
[
{
"task_type": "MONTH",
"params": "12T11:22:00+08:00"
}
]
],
"actions": [
{
"action_type": "10",
"action_target": "设备id",
"action_param_type": "TEL",
"action_param": "temperature",
"action_value": "20"
},
{
"action_type": "11",
"action_target": "设备配置id",
"action_param_type": "TEL",
"action_param": "temperature",
"action_value": "20"
},
{
"action_type": "20",
"action_target": "场景id"
},
{
"action_type": "30",
"action_target": "告警id"
}
]
}
curl --location --request PUT 'http://127.0.0.1:9999/api/v1/scene_automations' \
--header 'x-token: {{x-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"id":"59e6fab9-448f-26bb-b608-3566b716ff72",
"name": "222",
"description": "xxx",
"enabled": "Y",
"trigger_condition_groups": [
[
{
"trigger_conditions_type": "10",
"trigger_source": "设备id",
"trigger_param_type": "TEL",
"trigger_param": "temperature",
"trigger_operator": ">",
"trigger_value": "20"
}
],
[
{
"trigger_conditions_type": "11",
"trigger_source": "设备配置id",
"trigger_param_type": "TEL",
"trigger_param": "temperature",
"trigger_operator": ">",
"trigger_value": "20"
},
{
"trigger_conditions_type": "22",
"trigger_value": "137|22:01:00+08:00|23:00:00+08:00"
}
],
[
{
"execution_time": "2024-04-01T11:22:00Z",
"expiration_time": "2024-04-01T11:22:00Z"
}
],
[
{
"//": "时间条件-重复-东八区每小时22分0秒",
"task_type": "HOUR",
"params": "22:00+08:00"
}
],
[
{
"task_type": "DAY",
"params": "11:22:00+08:00"
}
],
[
{
"task_type": "WEEK",
"params": "123|11:22:00+07:00"
}
],
[
{
"task_type": "MONTH",
"params": "12T11:22:00+08:00"
}
]
],
"actions": [
{
"action_type": "10",
"action_target": "设备id",
"action_param_type": "TEL",
"action_param": "temperature",
"action_value": "20"
},
{
"action_type": "11",
"action_target": "设备配置id",
"action_param_type": "TEL",
"action_param": "temperature",
"action_value": "20"
},
{
"action_type": "20",
"action_target": "场景id"
},
{
"action_type": "30",
"action_target": "告警id"
}
]
}'
{
"code": 200,
"message": "update scene automations successfully",
"data": {
"scene_automation_id": "59e6fab9-448f-26bb-b608-3566b716ff72"
}
}