node-switchbot 1.8.0-beta.0 → 1.8.0-beta.2
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/lib/switchbot.js +24 -4
- package/package.json +1 -1
package/lib/switchbot.js
CHANGED
|
@@ -93,7 +93,21 @@ class Switchbot {
|
|
|
93
93
|
model: {
|
|
94
94
|
required: false,
|
|
95
95
|
type: "string",
|
|
96
|
-
enum: [
|
|
96
|
+
enum: [
|
|
97
|
+
"H",
|
|
98
|
+
"T",
|
|
99
|
+
"e",
|
|
100
|
+
"s",
|
|
101
|
+
"d",
|
|
102
|
+
"c",
|
|
103
|
+
"u",
|
|
104
|
+
"g",
|
|
105
|
+
"j",
|
|
106
|
+
"o",
|
|
107
|
+
"i",
|
|
108
|
+
"r",
|
|
109
|
+
"x",
|
|
110
|
+
],
|
|
97
111
|
},
|
|
98
112
|
id: { required: false, type: "string", min: 12, max: 17 },
|
|
99
113
|
quick: { required: false, type: "boolean" },
|
|
@@ -230,6 +244,9 @@ class Switchbot {
|
|
|
230
244
|
case "c":
|
|
231
245
|
device = new SwitchbotDeviceWoCurtain(peripheral, this.noble);
|
|
232
246
|
break;
|
|
247
|
+
case "x":
|
|
248
|
+
device = new SwitchbotDeviceWoBlindTilt(peripheral, this.noble);
|
|
249
|
+
break;
|
|
233
250
|
case "u":
|
|
234
251
|
device = new SwitchbotDeviceWoBulb(peripheral, this.noble);
|
|
235
252
|
break;
|
|
@@ -241,7 +258,7 @@ class Switchbot {
|
|
|
241
258
|
device = new SwitchbotDeviceWoSmartLock(peripheral, this.noble);
|
|
242
259
|
break;
|
|
243
260
|
case "i":
|
|
244
|
-
device = new
|
|
261
|
+
device = new SwitchbotDeviceWoSensorTH(peripheral, this.noble);
|
|
245
262
|
break;
|
|
246
263
|
case "r":
|
|
247
264
|
device = new SwitchbotDeviceWoStrip(peripheral, this.noble);
|
|
@@ -280,7 +297,7 @@ class Switchbot {
|
|
|
280
297
|
*
|
|
281
298
|
* [Arguments]
|
|
282
299
|
* - params | Object | Optional |
|
|
283
|
-
* - model | String | Optional | "H", "T", "e", "s", "d", "c", "u", "g", "o", "i", or "r".
|
|
300
|
+
* - model | String | Optional | "H", "T", "e", "s", "d", "c", "u", "g", "o", "i", "x", or "r".
|
|
284
301
|
* | | | If "H" is specified, the `onadvertisement`
|
|
285
302
|
* | | | event handler will be called only when advertising
|
|
286
303
|
* | | | packets comes from Bots.
|
|
@@ -299,6 +316,9 @@ class Switchbot {
|
|
|
299
316
|
* | | | If "c" is specified, the `onadvertisement`
|
|
300
317
|
* | | | event handler will be called only when advertising
|
|
301
318
|
* | | | packets comes from Curtains.
|
|
319
|
+
* | | | If "x" is specified, the `onadvertisement`
|
|
320
|
+
* | | | event handler will be called only when advertising
|
|
321
|
+
* | | | packets comes from BlindTilt.
|
|
302
322
|
* | | | If "u" is specified, the `onadvertisement`
|
|
303
323
|
* | | | event handler will be called only when advertising
|
|
304
324
|
* | | | packets comes from Color Bulb.
|
|
@@ -335,7 +355,7 @@ class Switchbot {
|
|
|
335
355
|
model: {
|
|
336
356
|
required: false,
|
|
337
357
|
type: "string",
|
|
338
|
-
enum: ["H", "T", "e", "s", "d", "c", "u", "g", "j", "o", "i", "r"],
|
|
358
|
+
enum: ["H", "T", "e", "s", "d", "c", "u", "g", "j", "o", "i", "r", "x"],
|
|
339
359
|
},
|
|
340
360
|
id: { required: false, type: "string", min: 12, max: 17 },
|
|
341
361
|
},
|
package/package.json
CHANGED