1 Commits

Author SHA1 Message Date
a05373e50c 修改设备参数返回值 2025-10-17 17:31:52 +08:00

View File

@@ -120,7 +120,7 @@ func (d *Device) SetAttribute(deviceId uint32, attributeSet map[string]any) erro
}
// 获取设备属性
func (d *Device) GetAttribute(deviceId uint32) (*map[string]any, error) {
func (d *Device) GetAttribute(deviceId uint32) (map[string]any, error) {
body := map[string]any{
"device_id": deviceId,
}
@@ -131,7 +131,7 @@ func (d *Device) GetAttribute(deviceId uint32) (*map[string]any, error) {
if result.Code != 0 {
return nil, fmt.Errorf("%s", result.Message)
}
return &result.Data, nil
return result.Data, nil
}
// 更新设备版本信息