文档
测试
POST
{{host}}/api/light_button/add

请求参数

参数名
类型
描述
必填
button_name
string
层级控制按钮名称
必填
level_id
int
层级ID
必填
loop_config
array
配电回路
必填
group_config
array
蓝牙分组
必填
client_display
enum
客户端是否显示,0-隐藏,1-显示
必填

响应参数

参数名
类型
描述
必填
ret
int
返回码:0-正常,非0-失败
必填
msg
string
返回消息
必填

说明 / 示例

###### 示例代码 ```javascript //请求 let res = await post("api/light_button/add", { button_name: "全部关闭", level_id: 169, client_display: 1, group_config: { control: { bt_group_id: 58, device_type: "MeshDimmingController", command: "dimming", status: 0 }, checked: 0, label: "[C06B] 全部" }, loop_config: { control: { loop_id: 31, device_type: "LoopController_6", command: "switch", status: 0 }, checked: 0, label: "回路1" } }) //返回 res = { ret: 0, msg: "新增成功" } ```