Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a05373e50c |
@@ -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{
|
body := map[string]any{
|
||||||
"device_id": deviceId,
|
"device_id": deviceId,
|
||||||
}
|
}
|
||||||
@@ -131,7 +131,7 @@ func (d *Device) GetAttribute(deviceId uint32) (*map[string]any, error) {
|
|||||||
if result.Code != 0 {
|
if result.Code != 0 {
|
||||||
return nil, fmt.Errorf("%s", result.Message)
|
return nil, fmt.Errorf("%s", result.Message)
|
||||||
}
|
}
|
||||||
return &result.Data, nil
|
return result.Data, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新设备版本信息
|
// 更新设备版本信息
|
||||||
|
|||||||
Reference in New Issue
Block a user