更新时间:2024-03-06 09:29:09下载pdf
本文介绍查询家庭下场景列表的 API。
查询指定家庭下的场景列表。
GET: /v1.1/homes/{home_id}/scenes
| 参数名 | 类型 | 参数位置 | 是否必填 | 说明 |
|---|---|---|---|---|
| home_id | String | uri | false | 家庭 ID |
| 参数名 | 类型 | 说明 |
|---|---|---|
| result | List | 返回结果 |
result 说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| scene_id | String | 场景 ID |
| name | String | 场景名称 |
| background | String | 背景图片 |
| actions | List | 动作列表 |
| enabled | Boolean | 是否启用指定的场景 |
actions 说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| entity_id | String | 设备 ID |
| executor_property | JSONObject | 执行动作参数 |
| action_executor | String | 执⾏动作类别,当前仅支持 dpIssue |
| extra_property | String | 执行动作额外信息 |
| action_strategy | String | 执行动作策略 |
GET: /v1.1/homes/6****/scenes
{
"result": [
{
"scene_id": "53IYSXI3gEn2w***",
"enabled": true,
"background": "https://images.tuyacn.com/smart/rule/cover/starry.png",
"name": "开启球泡灯",
"actions": [
{
"entity_id": "0120090568c63a89****",
"executor_property": {
"work_mode": "scene_2"
},
"action_executor": "dpIssue"
}
],
"status": "1"
},
{
"scene_id": "DKgx28KbdPfz****",
"background": "https://images.tuyacn.com/smart/rule/cover/****.png",
"name": "早上",
"actions": [
{
"entity_id": "012000715ccf7f4f****",
"executor_property": {
"switch_led": true
},
"action_executor": "dpIssue"
}
]
}
],
"t": 1541071460239,
"success": true
}
参考 错误码。
该内容对您有帮助吗?
是意见反馈该内容对您有帮助吗?
是意见反馈