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

请求参数

参数名
类型
描述
必填
button_id
int
按钮ID
必填
button_name
string
层级控制按钮名称
可选
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/update", { button_id: 23, button_name: "全部关闭", 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: "更新成功" } ```