tsvesync 1.0.73 → 1.0.75
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/dist/lib/fans/air131.d.ts +80 -0
- package/dist/lib/fans/air131.js +446 -0
- package/dist/lib/fans/airBypass.d.ts +4 -0
- package/dist/lib/fans/airBypass.js +24 -279
- package/dist/lib/fans/index.d.ts +1 -0
- package/dist/lib/fans/index.js +10 -8
- package/dist/lib/vesyncFan.d.ts +2 -2
- package/dist/lib/vesyncFan.js +35 -35
- package/package.json +3 -1
- package/src/lib/fans/air131.ts +533 -0
- package/src/lib/fans/airBypass.ts +24 -338
- package/src/lib/fans/index.ts +6 -4
- package/src/lib/vesyncFan.ts +37 -37
|
@@ -36,45 +36,8 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
|
|
|
36
36
|
* Get device details
|
|
37
37
|
*/
|
|
38
38
|
async getDetails() {
|
|
39
|
-
var _a
|
|
39
|
+
var _a;
|
|
40
40
|
logger_1.logger.debug(`Getting details for device: ${this.deviceName}`);
|
|
41
|
-
// Special handling for LV series
|
|
42
|
-
if (this.deviceType.startsWith('LV-')) {
|
|
43
|
-
const [response, status] = await this.callApi('/131airPurifier/v1/device/devicedetail', 'post', {
|
|
44
|
-
acceptLanguage: 'en',
|
|
45
|
-
accountID: this.manager.accountId,
|
|
46
|
-
appVersion: '2.8.6',
|
|
47
|
-
method: 'devicedetail',
|
|
48
|
-
mobileId: '1234567890123456',
|
|
49
|
-
phoneBrand: 'SM N9005',
|
|
50
|
-
phoneOS: 'Android',
|
|
51
|
-
timeZone: this.manager.timeZone,
|
|
52
|
-
token: this.manager.token,
|
|
53
|
-
uuid: this.uuid
|
|
54
|
-
}, {
|
|
55
|
-
'accept-language': 'en',
|
|
56
|
-
'accountId': this.manager.accountId,
|
|
57
|
-
'appVersion': '2.8.6',
|
|
58
|
-
'content-type': 'application/json',
|
|
59
|
-
'tk': this.manager.token,
|
|
60
|
-
'tz': this.manager.timeZone
|
|
61
|
-
});
|
|
62
|
-
const success = this.checkResponse([response, status], 'getDetails');
|
|
63
|
-
if (success && response) {
|
|
64
|
-
this.deviceStatus = ((_b = (_a = response.result) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.deviceStatus) === 'on' ? 'on' : 'off';
|
|
65
|
-
this.details = {
|
|
66
|
-
mode: ((_d = (_c = response.result) === null || _c === void 0 ? void 0 : _c.result) === null || _d === void 0 ? void 0 : _d.mode) || '',
|
|
67
|
-
speed: ((_f = (_e = response.result) === null || _e === void 0 ? void 0 : _e.result) === null || _f === void 0 ? void 0 : _f.level) || 0,
|
|
68
|
-
filterLife: ((_h = (_g = response.result) === null || _g === void 0 ? void 0 : _g.result) === null || _h === void 0 ? void 0 : _h.filterLife) || 0,
|
|
69
|
-
screenStatus: ((_k = (_j = response.result) === null || _j === void 0 ? void 0 : _j.result) === null || _k === void 0 ? void 0 : _k.display) ? 'on' : 'off',
|
|
70
|
-
childLock: ((_m = (_l = response.result) === null || _l === void 0 ? void 0 : _l.result) === null || _m === void 0 ? void 0 : _m.childLock) || false,
|
|
71
|
-
airQuality: ((_p = (_o = response.result) === null || _o === void 0 ? void 0 : _o.result) === null || _p === void 0 ? void 0 : _p.airQuality) || 0
|
|
72
|
-
};
|
|
73
|
-
return true;
|
|
74
|
-
}
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
// Original implementation for other devices
|
|
78
41
|
const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
|
|
79
42
|
...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
|
|
80
43
|
cid: this.cid,
|
|
@@ -87,7 +50,7 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
|
|
|
87
50
|
}, helpers_1.Helpers.reqHeaderBypass());
|
|
88
51
|
const success = this.checkResponse([response, status], 'getDetails');
|
|
89
52
|
if (success) {
|
|
90
|
-
const result = (
|
|
53
|
+
const result = (_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.result;
|
|
91
54
|
if (result) {
|
|
92
55
|
this.deviceStatus = result.enabled ? 'on' : 'off';
|
|
93
56
|
this.details = {
|
|
@@ -112,30 +75,6 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
|
|
|
112
75
|
*/
|
|
113
76
|
async turnOn() {
|
|
114
77
|
logger_1.logger.info(`Turning on device: ${this.deviceName}`);
|
|
115
|
-
// Special handling for LV series
|
|
116
|
-
if (this.deviceType.startsWith('LV-')) {
|
|
117
|
-
const [response, status] = await this.callApi('/131airPurifier/v1/device/deviceStatus', 'put', {
|
|
118
|
-
acceptLanguage: 'en',
|
|
119
|
-
accountID: this.manager.accountId,
|
|
120
|
-
status: 'on',
|
|
121
|
-
timeZone: this.manager.timeZone,
|
|
122
|
-
token: this.manager.token,
|
|
123
|
-
uuid: this.uuid
|
|
124
|
-
}, {
|
|
125
|
-
'accept-language': 'en',
|
|
126
|
-
'accountId': this.manager.accountId,
|
|
127
|
-
'appVersion': '2.8.6',
|
|
128
|
-
'content-type': 'application/json',
|
|
129
|
-
'tk': this.manager.token,
|
|
130
|
-
'tz': this.manager.timeZone
|
|
131
|
-
});
|
|
132
|
-
const success = this.checkResponse([response, status], 'turnOn');
|
|
133
|
-
if (!success) {
|
|
134
|
-
logger_1.logger.error(`Failed to turn on device: ${this.deviceName}`);
|
|
135
|
-
}
|
|
136
|
-
return success;
|
|
137
|
-
}
|
|
138
|
-
// Original implementation for other devices
|
|
139
78
|
const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
|
|
140
79
|
...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
|
|
141
80
|
cid: this.cid,
|
|
@@ -160,30 +99,6 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
|
|
|
160
99
|
*/
|
|
161
100
|
async turnOff() {
|
|
162
101
|
logger_1.logger.info(`Turning off device: ${this.deviceName}`);
|
|
163
|
-
// Special handling for LV series
|
|
164
|
-
if (this.deviceType.startsWith('LV-')) {
|
|
165
|
-
const [response, status] = await this.callApi('/131airPurifier/v1/device/deviceStatus', 'put', {
|
|
166
|
-
acceptLanguage: 'en',
|
|
167
|
-
accountID: this.manager.accountId,
|
|
168
|
-
status: 'off',
|
|
169
|
-
timeZone: this.manager.timeZone,
|
|
170
|
-
token: this.manager.token,
|
|
171
|
-
uuid: this.uuid
|
|
172
|
-
}, {
|
|
173
|
-
'accept-language': 'en',
|
|
174
|
-
'accountId': this.manager.accountId,
|
|
175
|
-
'appVersion': '2.8.6',
|
|
176
|
-
'content-type': 'application/json',
|
|
177
|
-
'tk': this.manager.token,
|
|
178
|
-
'tz': this.manager.timeZone
|
|
179
|
-
});
|
|
180
|
-
const success = this.checkResponse([response, status], 'turnOff');
|
|
181
|
-
if (!success) {
|
|
182
|
-
logger_1.logger.error(`Failed to turn off device: ${this.deviceName}`);
|
|
183
|
-
}
|
|
184
|
-
return success;
|
|
185
|
-
}
|
|
186
|
-
// Original implementation for other devices
|
|
187
102
|
const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
|
|
188
103
|
...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
|
|
189
104
|
cid: this.cid,
|
|
@@ -207,50 +122,13 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
|
|
|
207
122
|
* Change fan speed
|
|
208
123
|
*/
|
|
209
124
|
async changeFanSpeed(speed) {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
logger_1.logger.info(`Changing fan speed to ${speed} for device: ${this.deviceName}`);
|
|
216
|
-
// Special handling for LV series
|
|
217
|
-
if (this.deviceType.startsWith('LV-')) {
|
|
218
|
-
// Check if device is in manual mode
|
|
219
|
-
if (this.details.mode !== 'manual') {
|
|
220
|
-
logger_1.logger.debug(`${this.deviceName} not in manual mode, cannot change speed`);
|
|
221
|
-
return false;
|
|
222
|
-
}
|
|
223
|
-
// Validate speed for LV series (1-3)
|
|
224
|
-
if (speed < 1 || speed > 3) {
|
|
225
|
-
logger_1.logger.error(`Invalid fan speed: ${speed}. Must be between 1 and 3 for device: ${this.deviceName}`);
|
|
226
|
-
return false;
|
|
227
|
-
}
|
|
228
|
-
const [response, status] = await this.callApi('/131airPurifier/v1/device/updateSpeed', 'put', {
|
|
229
|
-
acceptLanguage: 'en',
|
|
230
|
-
accountID: this.manager.accountId,
|
|
231
|
-
level: speed,
|
|
232
|
-
timeZone: this.manager.timeZone,
|
|
233
|
-
token: this.manager.token,
|
|
234
|
-
uuid: this.uuid
|
|
235
|
-
}, {
|
|
236
|
-
'accept-language': 'en',
|
|
237
|
-
'accountId': this.manager.accountId,
|
|
238
|
-
'appVersion': '2.8.6',
|
|
239
|
-
'content-type': 'application/json',
|
|
240
|
-
'tk': this.manager.token,
|
|
241
|
-
'tz': this.manager.timeZone
|
|
242
|
-
});
|
|
243
|
-
const success = this.checkResponse([response, status], 'changeFanSpeed');
|
|
244
|
-
if (success) {
|
|
245
|
-
this.details.speed = speed;
|
|
246
|
-
return true;
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
logger_1.logger.error(`Failed to change fan speed to ${speed} for device: ${this.deviceName}`);
|
|
250
|
-
return false;
|
|
251
|
-
}
|
|
125
|
+
var _a;
|
|
126
|
+
const speeds = (_a = this.config.levels) !== null && _a !== void 0 ? _a : [];
|
|
127
|
+
if (!speeds.includes(speed)) {
|
|
128
|
+
logger_1.logger.error(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')} for device: ${this.deviceName}`);
|
|
129
|
+
return false;
|
|
252
130
|
}
|
|
253
|
-
|
|
131
|
+
logger_1.logger.info(`Changing fan speed to ${speed} for device: ${this.deviceName}`);
|
|
254
132
|
const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
|
|
255
133
|
...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
|
|
256
134
|
cid: this.cid,
|
|
@@ -282,38 +160,6 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
|
|
|
282
160
|
throw new Error(error);
|
|
283
161
|
}
|
|
284
162
|
logger_1.logger.debug(`Setting mode to ${mode} for device: ${this.deviceName}`);
|
|
285
|
-
// Special handling for LV series
|
|
286
|
-
if (this.deviceType.startsWith('LV-')) {
|
|
287
|
-
const payload = {
|
|
288
|
-
acceptLanguage: 'en',
|
|
289
|
-
accountID: this.manager.accountId,
|
|
290
|
-
mode: mode,
|
|
291
|
-
timeZone: this.manager.timeZone,
|
|
292
|
-
token: this.manager.token,
|
|
293
|
-
uuid: this.uuid
|
|
294
|
-
};
|
|
295
|
-
// For manual mode, we need to set the level
|
|
296
|
-
if (mode === 'manual') {
|
|
297
|
-
payload.level = this.details.speed || 1;
|
|
298
|
-
}
|
|
299
|
-
const [response, status] = await this.callApi('/131airPurifier/v1/device/updateMode', 'put', payload, {
|
|
300
|
-
'accept-language': 'en',
|
|
301
|
-
'accountId': this.manager.accountId,
|
|
302
|
-
'appVersion': '2.8.6',
|
|
303
|
-
'content-type': 'application/json',
|
|
304
|
-
'tk': this.manager.token,
|
|
305
|
-
'tz': this.manager.timeZone
|
|
306
|
-
});
|
|
307
|
-
const success = this.checkResponse([response, status], 'setMode');
|
|
308
|
-
if (success) {
|
|
309
|
-
this.details.mode = mode;
|
|
310
|
-
return true;
|
|
311
|
-
}
|
|
312
|
-
else {
|
|
313
|
-
logger_1.logger.error(`Failed to set mode to ${mode} for device: ${this.deviceName}`);
|
|
314
|
-
return false;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
163
|
// Special handling for Core200S auto mode
|
|
318
164
|
if (this.deviceType.includes('Core200S') && mode === 'auto') {
|
|
319
165
|
// Core200S doesn't support auto mode, so we'll set it to manual mode
|
|
@@ -358,34 +204,6 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
|
|
|
358
204
|
logger_1.logger.warn(`Device ${this.deviceName} is in sleep mode, display control may not work`);
|
|
359
205
|
}
|
|
360
206
|
logger_1.logger.debug(`Setting display to ${enabled ? 'on' : 'off'} for device: ${this.deviceName}`);
|
|
361
|
-
// Special handling for LV series
|
|
362
|
-
if (this.deviceType.startsWith('LV-')) {
|
|
363
|
-
const [response, status] = await this.callApi('/131airPurifier/v1/device/updateScreen', 'put', {
|
|
364
|
-
acceptLanguage: 'en',
|
|
365
|
-
accountID: this.manager.accountId,
|
|
366
|
-
status: enabled ? 'on' : 'off',
|
|
367
|
-
timeZone: this.manager.timeZone,
|
|
368
|
-
token: this.manager.token,
|
|
369
|
-
uuid: this.uuid
|
|
370
|
-
}, {
|
|
371
|
-
'accept-language': 'en',
|
|
372
|
-
'accountId': this.manager.accountId,
|
|
373
|
-
'appVersion': '2.8.6',
|
|
374
|
-
'content-type': 'application/json',
|
|
375
|
-
'tk': this.manager.token,
|
|
376
|
-
'tz': this.manager.timeZone
|
|
377
|
-
});
|
|
378
|
-
const success = this.checkResponse([response, status], 'setDisplay');
|
|
379
|
-
if (success) {
|
|
380
|
-
this.details.screenStatus = enabled ? 'on' : 'off';
|
|
381
|
-
return true;
|
|
382
|
-
}
|
|
383
|
-
else {
|
|
384
|
-
logger_1.logger.error(`Failed to set display to ${enabled ? 'on' : 'off'} for device: ${this.deviceName}`);
|
|
385
|
-
return false;
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
// Standard implementation for other devices
|
|
389
207
|
const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
|
|
390
208
|
...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
|
|
391
209
|
cid: this.cid,
|
|
@@ -428,39 +246,6 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
|
|
|
428
246
|
logger_1.logger.warn(`Device ${this.deviceName} is in sleep mode, child lock control may not work`);
|
|
429
247
|
}
|
|
430
248
|
logger_1.logger.debug(`Setting child lock to ${enabled ? 'on' : 'off'} for device: ${this.deviceName}`);
|
|
431
|
-
// Special handling for LV series
|
|
432
|
-
if (this.deviceType.startsWith('LV-')) {
|
|
433
|
-
const [response, status] = await this.callApi('/131airPurifier/v1/device/updateChildLock', 'put', {
|
|
434
|
-
acceptLanguage: 'en',
|
|
435
|
-
accountID: this.manager.accountId,
|
|
436
|
-
status: enabled ? 'on' : 'off',
|
|
437
|
-
timeZone: this.manager.timeZone,
|
|
438
|
-
token: this.manager.token,
|
|
439
|
-
uuid: this.uuid
|
|
440
|
-
}, {
|
|
441
|
-
'accept-language': 'en',
|
|
442
|
-
'accountId': this.manager.accountId,
|
|
443
|
-
'appVersion': '2.8.6',
|
|
444
|
-
'content-type': 'application/json',
|
|
445
|
-
'tk': this.manager.token,
|
|
446
|
-
'tz': this.manager.timeZone
|
|
447
|
-
});
|
|
448
|
-
const success = this.checkResponse([response, status], 'setChildLock');
|
|
449
|
-
if (success) {
|
|
450
|
-
this.details.childLock = enabled;
|
|
451
|
-
return true;
|
|
452
|
-
}
|
|
453
|
-
else {
|
|
454
|
-
// Check for error code 11000000 (feature not supported)
|
|
455
|
-
if ((response === null || response === void 0 ? void 0 : response.code) === 11000000) {
|
|
456
|
-
logger_1.logger.warn(`Child lock control not supported via API for device: ${this.deviceName}`);
|
|
457
|
-
return false;
|
|
458
|
-
}
|
|
459
|
-
logger_1.logger.error(`Failed to set child lock to ${enabled ? 'on' : 'off'} for device: ${this.deviceName}`);
|
|
460
|
-
return false;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
// Standard implementation for other devices
|
|
464
249
|
const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
|
|
465
250
|
...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
|
|
466
251
|
cid: this.cid,
|
|
@@ -498,36 +283,12 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
|
|
|
498
283
|
logger_1.logger.error(`${error} for device: ${this.deviceName}`);
|
|
499
284
|
throw new Error(error);
|
|
500
285
|
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
acceptLanguage: 'en',
|
|
506
|
-
accountID: this.manager.accountId,
|
|
507
|
-
action: 'off',
|
|
508
|
-
duration: hours,
|
|
509
|
-
timeZone: this.manager.timeZone,
|
|
510
|
-
token: this.manager.token,
|
|
511
|
-
uuid: this.uuid
|
|
512
|
-
}, {
|
|
513
|
-
'accept-language': 'en',
|
|
514
|
-
'accountId': this.manager.accountId,
|
|
515
|
-
'appVersion': '2.8.6',
|
|
516
|
-
'content-type': 'application/json',
|
|
517
|
-
'tk': this.manager.token,
|
|
518
|
-
'tz': this.manager.timeZone
|
|
519
|
-
});
|
|
520
|
-
const success = this.checkResponse([response, status], 'setTimer');
|
|
521
|
-
if (success) {
|
|
522
|
-
this.timer = { duration: hours * 3600, action: 'off' };
|
|
523
|
-
return true;
|
|
524
|
-
}
|
|
525
|
-
else {
|
|
526
|
-
logger_1.logger.error(`Failed to set timer to ${hours} hours for device: ${this.deviceName}`);
|
|
527
|
-
return false;
|
|
528
|
-
}
|
|
286
|
+
// Check if device is on - timer can only be set when device is on
|
|
287
|
+
if (this.deviceStatus !== 'on') {
|
|
288
|
+
logger_1.logger.debug(`Cannot set timer when device is off: ${this.deviceName}`);
|
|
289
|
+
return false;
|
|
529
290
|
}
|
|
530
|
-
|
|
291
|
+
logger_1.logger.debug(`Setting timer to ${hours} hours for device: ${this.deviceName}`);
|
|
531
292
|
const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
|
|
532
293
|
...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
|
|
533
294
|
cid: this.cid,
|
|
@@ -574,33 +335,6 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
|
|
|
574
335
|
return true;
|
|
575
336
|
}
|
|
576
337
|
logger_1.logger.debug(`Clearing timer for device: ${this.deviceName}`);
|
|
577
|
-
// Special handling for LV series
|
|
578
|
-
if (this.deviceType.startsWith('LV-')) {
|
|
579
|
-
const [response, status] = await this.callApi('/131airPurifier/v1/device/cancelTimer', 'put', {
|
|
580
|
-
acceptLanguage: 'en',
|
|
581
|
-
accountID: this.manager.accountId,
|
|
582
|
-
timeZone: this.manager.timeZone,
|
|
583
|
-
token: this.manager.token,
|
|
584
|
-
uuid: this.uuid
|
|
585
|
-
}, {
|
|
586
|
-
'accept-language': 'en',
|
|
587
|
-
'accountId': this.manager.accountId,
|
|
588
|
-
'appVersion': '2.8.6',
|
|
589
|
-
'content-type': 'application/json',
|
|
590
|
-
'tk': this.manager.token,
|
|
591
|
-
'tz': this.manager.timeZone
|
|
592
|
-
});
|
|
593
|
-
const success = this.checkResponse([response, status], 'clearTimer');
|
|
594
|
-
if (success) {
|
|
595
|
-
this.timer = null;
|
|
596
|
-
return true;
|
|
597
|
-
}
|
|
598
|
-
else {
|
|
599
|
-
logger_1.logger.error(`Failed to clear timer for device: ${this.deviceName}`);
|
|
600
|
-
return false;
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
// Standard implementation for other devices
|
|
604
338
|
const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
|
|
605
339
|
...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
|
|
606
340
|
cid: this.cid,
|
|
@@ -677,6 +411,11 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
|
|
|
677
411
|
* Set auto mode
|
|
678
412
|
*/
|
|
679
413
|
async autoMode() {
|
|
414
|
+
// Check if auto mode is supported
|
|
415
|
+
if (!this.hasFeature('auto_mode')) {
|
|
416
|
+
logger_1.logger.debug(`Auto mode not supported for device: ${this.deviceName}`);
|
|
417
|
+
return false;
|
|
418
|
+
}
|
|
680
419
|
logger_1.logger.debug(`Setting auto mode for device: ${this.deviceName}`);
|
|
681
420
|
const success = await this.setMode('auto');
|
|
682
421
|
if (!success) {
|
|
@@ -728,5 +467,11 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
|
|
|
728
467
|
}
|
|
729
468
|
return success;
|
|
730
469
|
}
|
|
470
|
+
/**
|
|
471
|
+
* Get night light state
|
|
472
|
+
*/
|
|
473
|
+
get nightLight() {
|
|
474
|
+
return this.details.night_light || 'off';
|
|
475
|
+
}
|
|
731
476
|
}
|
|
732
477
|
exports.VeSyncAirBypass = VeSyncAirBypass;
|
package/dist/lib/fans/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { VeSyncFan } from '../vesyncFan';
|
|
|
2
2
|
import { VeSync } from '../vesync';
|
|
3
3
|
export { VeSyncAirBypass } from './airBypass';
|
|
4
4
|
export { VeSyncAirBaseV2 } from './airBaseV2';
|
|
5
|
+
export { VeSyncAir131 } from './air131';
|
|
5
6
|
export { VeSyncTowerFan } from './towerFan';
|
|
6
7
|
export { VeSyncHumidifier } from './humidifier';
|
|
7
8
|
export { VeSyncWarmHumidifier } from './warmHumidifier';
|
package/dist/lib/fans/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fanModules = exports.VeSyncHumid200S = exports.VeSyncHumid1000S = exports.VeSyncSuperior6000S = exports.VeSyncHumid200300S = exports.VeSyncWarmHumidifier = exports.VeSyncHumidifier = exports.VeSyncTowerFan = exports.VeSyncAirBaseV2 = exports.VeSyncAirBypass = void 0;
|
|
3
|
+
exports.fanModules = exports.VeSyncHumid200S = exports.VeSyncHumid1000S = exports.VeSyncSuperior6000S = exports.VeSyncHumid200300S = exports.VeSyncWarmHumidifier = exports.VeSyncHumidifier = exports.VeSyncTowerFan = exports.VeSyncAir131 = exports.VeSyncAirBaseV2 = exports.VeSyncAirBypass = void 0;
|
|
4
4
|
const airBypass_1 = require("./airBypass");
|
|
5
5
|
const airBaseV2_1 = require("./airBaseV2");
|
|
6
|
+
const air131_1 = require("./air131");
|
|
6
7
|
const towerFan_1 = require("./towerFan");
|
|
7
|
-
const humidifier_1 = require("./humidifier");
|
|
8
8
|
const humid200300S_1 = require("./humid200300S");
|
|
9
9
|
const superior6000S_1 = require("./superior6000S");
|
|
10
10
|
const humid1000S_1 = require("./humid1000S");
|
|
@@ -14,10 +14,12 @@ var airBypass_2 = require("./airBypass");
|
|
|
14
14
|
Object.defineProperty(exports, "VeSyncAirBypass", { enumerable: true, get: function () { return airBypass_2.VeSyncAirBypass; } });
|
|
15
15
|
var airBaseV2_2 = require("./airBaseV2");
|
|
16
16
|
Object.defineProperty(exports, "VeSyncAirBaseV2", { enumerable: true, get: function () { return airBaseV2_2.VeSyncAirBaseV2; } });
|
|
17
|
+
var air131_2 = require("./air131");
|
|
18
|
+
Object.defineProperty(exports, "VeSyncAir131", { enumerable: true, get: function () { return air131_2.VeSyncAir131; } });
|
|
17
19
|
var towerFan_2 = require("./towerFan");
|
|
18
20
|
Object.defineProperty(exports, "VeSyncTowerFan", { enumerable: true, get: function () { return towerFan_2.VeSyncTowerFan; } });
|
|
19
|
-
var
|
|
20
|
-
Object.defineProperty(exports, "VeSyncHumidifier", { enumerable: true, get: function () { return
|
|
21
|
+
var humidifier_1 = require("./humidifier");
|
|
22
|
+
Object.defineProperty(exports, "VeSyncHumidifier", { enumerable: true, get: function () { return humidifier_1.VeSyncHumidifier; } });
|
|
21
23
|
var warmHumidifier_1 = require("./warmHumidifier");
|
|
22
24
|
Object.defineProperty(exports, "VeSyncWarmHumidifier", { enumerable: true, get: function () { return warmHumidifier_1.VeSyncWarmHumidifier; } });
|
|
23
25
|
var humid200300S_2 = require("./humid200300S");
|
|
@@ -72,10 +74,10 @@ exports.fanModules = {
|
|
|
72
74
|
'LTF-F422_WJP': towerFan_1.VeSyncTowerFan,
|
|
73
75
|
'LTF-F422S-WUS': towerFan_1.VeSyncTowerFan,
|
|
74
76
|
// Classic Series
|
|
75
|
-
'Classic300S':
|
|
77
|
+
'Classic300S': humid200300S_1.VeSyncHumid200300S,
|
|
76
78
|
'Classic200S': humid200S_1.VeSyncHumid200S,
|
|
77
79
|
// Dual Series
|
|
78
|
-
'Dual200S':
|
|
80
|
+
'Dual200S': humid200300S_1.VeSyncHumid200300S,
|
|
79
81
|
// LUH Series
|
|
80
82
|
'LUH-A601S-WUSB': humid200300S_1.VeSyncHumid200300S,
|
|
81
83
|
'LUH-A601S-AUSW': humid200300S_1.VeSyncHumid200300S,
|
|
@@ -99,6 +101,6 @@ exports.fanModules = {
|
|
|
99
101
|
'LEH-S601S-WUS': superior6000S_1.VeSyncSuperior6000S,
|
|
100
102
|
'LEH-S601S-WUSR': superior6000S_1.VeSyncSuperior6000S,
|
|
101
103
|
// LV Series
|
|
102
|
-
'LV-PUR131S':
|
|
103
|
-
'LV-RH131S':
|
|
104
|
+
'LV-PUR131S': air131_1.VeSyncAir131,
|
|
105
|
+
'LV-RH131S': air131_1.VeSyncAir131
|
|
104
106
|
};
|
package/dist/lib/vesyncFan.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { VeSyncBaseDevice } from './vesyncBaseDevice';
|
|
|
5
5
|
import { VeSync } from './vesync';
|
|
6
6
|
interface FanConfig {
|
|
7
7
|
[key: string]: {
|
|
8
|
-
module: 'VeSyncAirBypass' | 'VeSyncHumidifier' | 'VeSyncWarmHumidifier' | 'VeSyncTowerFan' | 'VeSyncAirBaseV2' | 'VeSyncSuperior6000S' | 'VeSyncHumid1000S' | 'VeSyncHumid200S';
|
|
8
|
+
module: 'VeSyncAirBypass' | 'VeSyncHumidifier' | 'VeSyncWarmHumidifier' | 'VeSyncTowerFan' | 'VeSyncAirBaseV2' | 'VeSyncSuperior6000S' | 'VeSyncHumid1000S' | 'VeSyncHumid200S' | 'VeSyncAir131';
|
|
9
9
|
features: string[];
|
|
10
10
|
levels?: number[];
|
|
11
11
|
};
|
|
@@ -35,7 +35,7 @@ export declare abstract class VeSyncFan extends VeSyncBaseDevice {
|
|
|
35
35
|
action: string;
|
|
36
36
|
} | null;
|
|
37
37
|
protected config: {
|
|
38
|
-
module: 'VeSyncAirBypass' | 'VeSyncHumidifier' | 'VeSyncWarmHumidifier' | 'VeSyncTowerFan' | 'VeSyncAirBaseV2' | 'VeSyncSuperior6000S' | 'VeSyncHumid1000S' | 'VeSyncHumid200S';
|
|
38
|
+
module: 'VeSyncAirBypass' | 'VeSyncHumidifier' | 'VeSyncWarmHumidifier' | 'VeSyncTowerFan' | 'VeSyncAirBaseV2' | 'VeSyncSuperior6000S' | 'VeSyncHumid1000S' | 'VeSyncHumid200S' | 'VeSyncAir131';
|
|
39
39
|
features: string[];
|
|
40
40
|
levels?: number[];
|
|
41
41
|
};
|