修改设备参数返回值
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
// 更新设备版本信息
|
||||
|
||||
Reference in New Issue
Block a user