mini_program_gizwits_sdk 3.2.22 → 3.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -136,6 +136,10 @@ sdk.setLogLevel("debug")
136
136
 
137
137
  订阅目标设备,订阅成功后可控制设备。返回值中可以拿到订阅结果。
138
138
 
139
+ ### sdk.getDeviceStatus(device: IDevice, attrNames?: string[])
140
+
141
+ 查询目标设备当前状态,attrNames 不传则查询所有数据
142
+
139
143
  ### sdk.write(device:[IDevice](#IDevice),cmd:{[key]:value})
140
144
 
141
145
  向目标设备发送指令。 其中`key`为数据点名称,value 为数据点的值。
@@ -33,7 +33,7 @@ export default class GizwitsWS {
33
33
  token: any;
34
34
  uid: any;
35
35
  }) => void;
36
- _getDevice: (did: string) => IError | IDevice;
36
+ _getDevice: (did: string) => IDevice | IError;
37
37
  _getConnect: (device: IDevice) => Connection;
38
38
  _getDeviceAndConnect: (did: string) => IError | [IDevice, Connection];
39
39
  connectDevice: (device: IDevice) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mini_program_gizwits_sdk",
3
- "version": "3.2.22",
3
+ "version": "3.2.23",
4
4
  "description": "更新文档",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {