tsvesync 1.0.64 → 1.0.66

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.
@@ -0,0 +1,83 @@
1
+ import { VeSyncFan } from '../vesyncFan';
2
+ import { VeSync } from '../vesync';
3
+ /**
4
+ * VeSync Humidifier Base Class
5
+ */
6
+ export declare class VeSyncHumidifier extends VeSyncFan {
7
+ protected readonly modes: readonly ["auto", "manual", "sleep"];
8
+ protected readonly mistLevels: number[];
9
+ protected readonly displayModes: readonly ["on", "off"];
10
+ protected readonly humidityRange: {
11
+ min: number;
12
+ max: number;
13
+ };
14
+ constructor(details: Record<string, any>, manager: VeSync);
15
+ /**
16
+ * Get device details
17
+ */
18
+ getDetails(): Promise<Boolean>;
19
+ /**
20
+ * Turn device on
21
+ */
22
+ turnOn(): Promise<boolean>;
23
+ /**
24
+ * Turn device off
25
+ */
26
+ turnOff(): Promise<boolean>;
27
+ /**
28
+ * Toggle device power
29
+ */
30
+ toggleSwitch(enabled: boolean): Promise<boolean>;
31
+ /**
32
+ * Set mist level
33
+ */
34
+ setMistLevel(level: number): Promise<boolean>;
35
+ /**
36
+ * Change fan speed - Implemented to satisfy interface but redirects to setMistLevel
37
+ */
38
+ changeFanSpeed(speed: number): Promise<boolean>;
39
+ /**
40
+ * Set device mode
41
+ */
42
+ setMode(mode: string): Promise<boolean>;
43
+ /**
44
+ * Set target humidity
45
+ */
46
+ setHumidity(humidity: number): Promise<boolean>;
47
+ /**
48
+ * Set display status
49
+ */
50
+ setDisplay(enabled: boolean): Promise<boolean>;
51
+ /**
52
+ * Set timer
53
+ */
54
+ setTimer(hours: number): Promise<boolean>;
55
+ /**
56
+ * Clear timer
57
+ */
58
+ clearTimer(): Promise<boolean>;
59
+ /**
60
+ * Turn automatic stop on
61
+ */
62
+ automaticStopOn(): Promise<boolean>;
63
+ /**
64
+ * Turn automatic stop off
65
+ */
66
+ automaticStopOff(): Promise<boolean>;
67
+ /**
68
+ * Set auto mode
69
+ */
70
+ setAutoMode(): Promise<boolean>;
71
+ /**
72
+ * Set manual mode
73
+ */
74
+ setManualMode(): Promise<boolean>;
75
+ /**
76
+ * Turn off display
77
+ */
78
+ turnOffDisplay(): Promise<boolean>;
79
+ /**
80
+ * Turn on display
81
+ */
82
+ turnOnDisplay(): Promise<boolean>;
83
+ }
@@ -0,0 +1,388 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VeSyncHumidifier = void 0;
4
+ const vesyncFan_1 = require("../vesyncFan");
5
+ const helpers_1 = require("../helpers");
6
+ const logger_1 = require("../logger");
7
+ /**
8
+ * VeSync Humidifier Base Class
9
+ */
10
+ class VeSyncHumidifier extends vesyncFan_1.VeSyncFan {
11
+ constructor(details, manager) {
12
+ super(details, manager);
13
+ this.modes = ['auto', 'manual', 'sleep'];
14
+ this.displayModes = ['on', 'off'];
15
+ this.humidityRange = { min: 30, max: 80 };
16
+ // Set mist levels based on model
17
+ switch (this.deviceType) {
18
+ case 'Dual200S':
19
+ case 'LUH-D301S-WUSR':
20
+ case 'LUH-D301S-WJP':
21
+ case 'LUH-D301S-WEU':
22
+ this.mistLevels = [1, 2];
23
+ break;
24
+ default:
25
+ // All other models support levels 1-9
26
+ this.mistLevels = [1, 2, 3, 4, 5, 6, 7, 8, 9];
27
+ }
28
+ logger_1.logger.debug(`Initialized VeSyncHumidifier device: ${this.deviceName}`);
29
+ }
30
+ /**
31
+ * Get device details
32
+ */
33
+ async getDetails() {
34
+ var _a;
35
+ logger_1.logger.debug(`Getting details for device: ${this.deviceName}`);
36
+ const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
37
+ ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
38
+ cid: this.cid,
39
+ configModule: this.configModule,
40
+ payload: {
41
+ data: {},
42
+ method: 'getHumidifierStatus',
43
+ source: 'APP'
44
+ }
45
+ }, helpers_1.Helpers.reqHeaderBypass());
46
+ const success = this.checkResponse([response, status], 'getDetails');
47
+ if (success && ((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.result)) {
48
+ const result = response.result.result;
49
+ // Handle model-specific status fields
50
+ if (this.deviceType.startsWith('Classic') || this.deviceType === 'Dual200S') {
51
+ this.deviceStatus = result.enabled ? 'on' : 'off';
52
+ }
53
+ else {
54
+ this.deviceStatus = result.powerSwitch === 1 ? 'on' : 'off';
55
+ }
56
+ this.details = {
57
+ mode: result.mode || '',
58
+ humidity: result.humidity || 0,
59
+ mist_level: result.level || 0,
60
+ mist_virtual_level: result.virtualLevel || 0,
61
+ warm_level: result.level || 0,
62
+ water_lacks: result.waterLacks || false,
63
+ humidity_high: result.humidityHigh || false,
64
+ water_tank_lifted: result.waterTankLifted || false,
65
+ display: result.display || false,
66
+ automatic_stop: result.automaticStop || false,
67
+ configuration: result.configuration || {},
68
+ connection_status: result.connectionStatus || null
69
+ };
70
+ logger_1.logger.debug(`Successfully got details for device: ${this.deviceName}`);
71
+ }
72
+ return success;
73
+ }
74
+ /**
75
+ * Turn device on
76
+ */
77
+ async turnOn() {
78
+ return this.toggleSwitch(true);
79
+ }
80
+ /**
81
+ * Turn device off
82
+ */
83
+ async turnOff() {
84
+ return this.toggleSwitch(false);
85
+ }
86
+ /**
87
+ * Toggle device power
88
+ */
89
+ async toggleSwitch(enabled) {
90
+ logger_1.logger.info(`Setting device power to ${enabled ? 'on' : 'off'}: ${this.deviceName}`);
91
+ const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
92
+ ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
93
+ cid: this.cid,
94
+ configModule: this.configModule,
95
+ payload: {
96
+ data: {
97
+ enabled: enabled,
98
+ id: 0
99
+ },
100
+ method: 'setSwitch',
101
+ source: 'APP'
102
+ }
103
+ }, helpers_1.Helpers.reqHeaderBypass());
104
+ const success = this.checkResponse([response, status], 'toggleSwitch');
105
+ if (success) {
106
+ this.deviceStatus = enabled ? 'on' : 'off';
107
+ }
108
+ else {
109
+ logger_1.logger.error(`Failed to set device power to ${enabled ? 'on' : 'off'} for device: ${this.deviceName}`);
110
+ }
111
+ return success;
112
+ }
113
+ /**
114
+ * Set mist level
115
+ */
116
+ async setMistLevel(level) {
117
+ if (!this.mistLevels.includes(level)) {
118
+ const error = `Invalid mist level: ${level}. Must be one of: ${this.mistLevels.join(', ')}`;
119
+ logger_1.logger.error(`${error} for device: ${this.deviceName}`);
120
+ throw new Error(error);
121
+ }
122
+ logger_1.logger.info(`Setting mist level to ${level} for device: ${this.deviceName}`);
123
+ const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
124
+ ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
125
+ cid: this.cid,
126
+ configModule: this.configModule,
127
+ payload: {
128
+ data: {
129
+ id: 0,
130
+ level: level,
131
+ type: 'mist'
132
+ },
133
+ method: 'setVirtualLevel',
134
+ source: 'APP'
135
+ }
136
+ }, helpers_1.Helpers.reqHeaderBypass());
137
+ const success = this.checkResponse([response, status], 'setMistLevel');
138
+ if (!success) {
139
+ logger_1.logger.error(`Failed to set mist level to ${level} for device: ${this.deviceName}`);
140
+ }
141
+ return success;
142
+ }
143
+ /**
144
+ * Change fan speed - Implemented to satisfy interface but redirects to setMistLevel
145
+ */
146
+ async changeFanSpeed(speed) {
147
+ logger_1.logger.debug(`Redirecting fan speed change to mist level for device: ${this.deviceName}`);
148
+ return this.setMistLevel(speed);
149
+ }
150
+ /**
151
+ * Set device mode
152
+ */
153
+ async setMode(mode) {
154
+ if (!this.modes.includes(mode)) {
155
+ const error = `Invalid mode: ${mode}. Must be one of: ${this.modes.join(', ')}`;
156
+ logger_1.logger.error(`${error} for device: ${this.deviceName}`);
157
+ throw new Error(error);
158
+ }
159
+ logger_1.logger.debug(`Setting mode to ${mode} for device: ${this.deviceName}`);
160
+ const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
161
+ ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
162
+ cid: this.cid,
163
+ configModule: this.configModule,
164
+ payload: {
165
+ data: {
166
+ mode
167
+ },
168
+ method: 'setHumidityMode',
169
+ source: 'APP'
170
+ }
171
+ }, helpers_1.Helpers.reqHeaderBypass());
172
+ const success = this.checkResponse([response, status], 'setMode');
173
+ if (success) {
174
+ this.details.mode = mode;
175
+ }
176
+ else {
177
+ logger_1.logger.error(`Failed to set mode to ${mode} for device: ${this.deviceName}`);
178
+ }
179
+ return success;
180
+ }
181
+ /**
182
+ * Set target humidity
183
+ */
184
+ async setHumidity(humidity) {
185
+ if (!this.hasFeature('humidity')) {
186
+ const error = 'Humidity control not supported';
187
+ logger_1.logger.error(`${error} for device: ${this.deviceName}`);
188
+ throw new Error(error);
189
+ }
190
+ if (humidity < this.humidityRange.min || humidity > this.humidityRange.max) {
191
+ const error = `Invalid humidity: ${humidity}. Must be between ${this.humidityRange.min} and ${this.humidityRange.max}`;
192
+ logger_1.logger.error(`${error} for device: ${this.deviceName}`);
193
+ throw new Error(error);
194
+ }
195
+ logger_1.logger.debug(`Setting target humidity to ${humidity}% for device: ${this.deviceName}`);
196
+ const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
197
+ ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
198
+ cid: this.cid,
199
+ configModule: this.configModule,
200
+ payload: {
201
+ data: {
202
+ target_humidity: humidity
203
+ },
204
+ method: 'setTargetHumidity',
205
+ source: 'APP'
206
+ }
207
+ }, helpers_1.Helpers.reqHeaderBypass());
208
+ const success = this.checkResponse([response, status], 'setHumidity');
209
+ if (!success) {
210
+ logger_1.logger.error(`Failed to set target humidity to ${humidity}% for device: ${this.deviceName}`);
211
+ }
212
+ return success;
213
+ }
214
+ /**
215
+ * Set display status
216
+ */
217
+ async setDisplay(enabled) {
218
+ if (!this.hasFeature('display')) {
219
+ const error = 'Display control not supported';
220
+ logger_1.logger.error(`${error} for device: ${this.deviceName}`);
221
+ throw new Error(error);
222
+ }
223
+ logger_1.logger.debug(`Setting display to ${enabled ? 'on' : 'off'} for device: ${this.deviceName}`);
224
+ const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
225
+ ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
226
+ cid: this.cid,
227
+ configModule: this.configModule,
228
+ payload: {
229
+ data: {
230
+ state: enabled
231
+ },
232
+ method: 'setDisplay',
233
+ source: 'APP'
234
+ }
235
+ }, helpers_1.Helpers.reqHeaderBypass());
236
+ const success = this.checkResponse([response, status], 'setDisplay');
237
+ if (!success) {
238
+ logger_1.logger.error(`Failed to set display to ${enabled ? 'on' : 'off'} for device: ${this.deviceName}`);
239
+ }
240
+ return success;
241
+ }
242
+ /**
243
+ * Set timer
244
+ */
245
+ async setTimer(hours) {
246
+ if (!this.hasFeature('timer')) {
247
+ const error = 'Timer not supported';
248
+ logger_1.logger.error(`${error} for device: ${this.deviceName}`);
249
+ throw new Error(error);
250
+ }
251
+ logger_1.logger.debug(`Setting timer to ${hours} hours for device: ${this.deviceName}`);
252
+ const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
253
+ ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
254
+ cid: this.cid,
255
+ configModule: this.configModule,
256
+ payload: {
257
+ data: {
258
+ action: 'off',
259
+ total: hours * 3600
260
+ },
261
+ method: 'addTimer',
262
+ source: 'APP'
263
+ }
264
+ }, helpers_1.Helpers.reqHeaderBypass());
265
+ const success = this.checkResponse([response, status], 'setTimer');
266
+ if (!success) {
267
+ logger_1.logger.error(`Failed to set timer to ${hours} hours for device: ${this.deviceName}`);
268
+ }
269
+ return success;
270
+ }
271
+ /**
272
+ * Clear timer
273
+ */
274
+ async clearTimer() {
275
+ if (!this.hasFeature('timer')) {
276
+ const error = 'Timer not supported';
277
+ logger_1.logger.error(`${error} for device: ${this.deviceName}`);
278
+ throw new Error(error);
279
+ }
280
+ logger_1.logger.debug(`Clearing timer for device: ${this.deviceName}`);
281
+ const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
282
+ ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
283
+ cid: this.cid,
284
+ configModule: this.configModule,
285
+ payload: {
286
+ data: {},
287
+ method: 'deleteTimer',
288
+ source: 'APP'
289
+ }
290
+ }, helpers_1.Helpers.reqHeaderBypass());
291
+ const success = this.checkResponse([response, status], 'clearTimer');
292
+ if (!success) {
293
+ logger_1.logger.error(`Failed to clear timer for device: ${this.deviceName}`);
294
+ }
295
+ return success;
296
+ }
297
+ /**
298
+ * Turn automatic stop on
299
+ */
300
+ async automaticStopOn() {
301
+ logger_1.logger.debug(`Setting automatic stop on for device: ${this.deviceName}`);
302
+ const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
303
+ ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
304
+ cid: this.cid,
305
+ configModule: this.configModule,
306
+ payload: {
307
+ data: {
308
+ enabled: true
309
+ },
310
+ method: 'setAutomaticStop',
311
+ source: 'APP'
312
+ }
313
+ }, helpers_1.Helpers.reqHeaderBypass());
314
+ const success = this.checkResponse([response, status], 'automaticStopOn');
315
+ if (!success) {
316
+ logger_1.logger.error(`Failed to set automatic stop on for device: ${this.deviceName}`);
317
+ }
318
+ return success;
319
+ }
320
+ /**
321
+ * Turn automatic stop off
322
+ */
323
+ async automaticStopOff() {
324
+ logger_1.logger.debug(`Setting automatic stop off for device: ${this.deviceName}`);
325
+ const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
326
+ ...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
327
+ cid: this.cid,
328
+ configModule: this.configModule,
329
+ payload: {
330
+ data: {
331
+ enabled: false
332
+ },
333
+ method: 'setAutomaticStop',
334
+ source: 'APP'
335
+ }
336
+ }, helpers_1.Helpers.reqHeaderBypass());
337
+ const success = this.checkResponse([response, status], 'automaticStopOff');
338
+ if (!success) {
339
+ logger_1.logger.error(`Failed to set automatic stop off for device: ${this.deviceName}`);
340
+ }
341
+ return success;
342
+ }
343
+ /**
344
+ * Set auto mode
345
+ */
346
+ async setAutoMode() {
347
+ logger_1.logger.debug(`Setting auto mode for device: ${this.deviceName}`);
348
+ const success = await this.setMode('auto');
349
+ if (!success) {
350
+ logger_1.logger.error(`Failed to set auto mode for device: ${this.deviceName}`);
351
+ }
352
+ return success;
353
+ }
354
+ /**
355
+ * Set manual mode
356
+ */
357
+ async setManualMode() {
358
+ logger_1.logger.debug(`Setting manual mode for device: ${this.deviceName}`);
359
+ const success = await this.setMode('manual');
360
+ if (!success) {
361
+ logger_1.logger.error(`Failed to set manual mode for device: ${this.deviceName}`);
362
+ }
363
+ return success;
364
+ }
365
+ /**
366
+ * Turn off display
367
+ */
368
+ async turnOffDisplay() {
369
+ logger_1.logger.debug(`Turning off display for device: ${this.deviceName}`);
370
+ const success = await this.setDisplay(false);
371
+ if (!success) {
372
+ logger_1.logger.error(`Failed to turn off display for device: ${this.deviceName}`);
373
+ }
374
+ return success;
375
+ }
376
+ /**
377
+ * Turn on display
378
+ */
379
+ async turnOnDisplay() {
380
+ logger_1.logger.debug(`Turning on display for device: ${this.deviceName}`);
381
+ const success = await this.setDisplay(true);
382
+ if (!success) {
383
+ logger_1.logger.error(`Failed to turn on display for device: ${this.deviceName}`);
384
+ }
385
+ return success;
386
+ }
387
+ }
388
+ exports.VeSyncHumidifier = VeSyncHumidifier;
@@ -0,0 +1,9 @@
1
+ import { VeSyncFan } from '../vesyncFan';
2
+ import { VeSync } from '../vesync';
3
+ export { VeSyncAirBypass } from './airBypass';
4
+ export { VeSyncAirBaseV2 } from './airBaseV2';
5
+ export { VeSyncTowerFan } from './towerFan';
6
+ export { VeSyncHumidifier } from './humidifier';
7
+ export { VeSyncWarmHumidifier } from './warmHumidifier';
8
+ export { VeSyncHumid200300S } from './humid200300S';
9
+ export declare const fanModules: Record<string, new (details: Record<string, any>, manager: VeSync) => VeSyncFan>;
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fanModules = exports.VeSyncHumid200300S = exports.VeSyncWarmHumidifier = exports.VeSyncHumidifier = exports.VeSyncTowerFan = exports.VeSyncAirBaseV2 = exports.VeSyncAirBypass = void 0;
4
+ const airBypass_1 = require("./airBypass");
5
+ const airBaseV2_1 = require("./airBaseV2");
6
+ const towerFan_1 = require("./towerFan");
7
+ const humidifier_1 = require("./humidifier");
8
+ const humid200300S_1 = require("./humid200300S");
9
+ // Re-export all classes
10
+ var airBypass_2 = require("./airBypass");
11
+ Object.defineProperty(exports, "VeSyncAirBypass", { enumerable: true, get: function () { return airBypass_2.VeSyncAirBypass; } });
12
+ var airBaseV2_2 = require("./airBaseV2");
13
+ Object.defineProperty(exports, "VeSyncAirBaseV2", { enumerable: true, get: function () { return airBaseV2_2.VeSyncAirBaseV2; } });
14
+ var towerFan_2 = require("./towerFan");
15
+ Object.defineProperty(exports, "VeSyncTowerFan", { enumerable: true, get: function () { return towerFan_2.VeSyncTowerFan; } });
16
+ var humidifier_2 = require("./humidifier");
17
+ Object.defineProperty(exports, "VeSyncHumidifier", { enumerable: true, get: function () { return humidifier_2.VeSyncHumidifier; } });
18
+ var warmHumidifier_1 = require("./warmHumidifier");
19
+ Object.defineProperty(exports, "VeSyncWarmHumidifier", { enumerable: true, get: function () { return warmHumidifier_1.VeSyncWarmHumidifier; } });
20
+ var humid200300S_2 = require("./humid200300S");
21
+ Object.defineProperty(exports, "VeSyncHumid200300S", { enumerable: true, get: function () { return humid200300S_2.VeSyncHumid200300S; } });
22
+ // Export fan modules dictionary
23
+ exports.fanModules = {
24
+ // Core Series
25
+ 'Core200S': airBypass_1.VeSyncAirBypass,
26
+ 'Core300S': airBypass_1.VeSyncAirBypass,
27
+ 'Core400S': airBypass_1.VeSyncAirBypass,
28
+ 'Core600S': airBypass_1.VeSyncAirBypass,
29
+ // LAP Series
30
+ 'LAP-C201S-AUSR': airBypass_1.VeSyncAirBypass,
31
+ 'LAP-C202S-WUSR': airBypass_1.VeSyncAirBypass,
32
+ 'LAP-C301S-WJP': airBypass_1.VeSyncAirBypass,
33
+ 'LAP-C302S-WUSB': airBypass_1.VeSyncAirBypass,
34
+ 'LAP-C301S-WAAA': airBypass_1.VeSyncAirBypass,
35
+ 'LAP-C401S-WJP': airBypass_1.VeSyncAirBypass,
36
+ 'LAP-C401S-WUSR': airBypass_1.VeSyncAirBypass,
37
+ 'LAP-C401S-WAAA': airBypass_1.VeSyncAirBypass,
38
+ 'LAP-C601S-WUS': airBypass_1.VeSyncAirBypass,
39
+ 'LAP-C601S-WUSR': airBypass_1.VeSyncAirBypass,
40
+ 'LAP-C601S-WEU': airBypass_1.VeSyncAirBypass,
41
+ // Vital100S Series - Using VeSyncAirBaseV2
42
+ 'LAP-V102S-AASR': airBaseV2_1.VeSyncAirBaseV2,
43
+ 'LAP-V102S-WUS': airBaseV2_1.VeSyncAirBaseV2,
44
+ 'LAP-V102S-WEU': airBaseV2_1.VeSyncAirBaseV2,
45
+ 'LAP-V102S-AUSR': airBaseV2_1.VeSyncAirBaseV2,
46
+ 'LAP-V102S-WJP': airBaseV2_1.VeSyncAirBaseV2,
47
+ // Vital200S Series - Using VeSyncAirBaseV2
48
+ 'LAP-V201S-AASR': airBaseV2_1.VeSyncAirBaseV2,
49
+ 'LAP-V201S-WJP': airBaseV2_1.VeSyncAirBaseV2,
50
+ 'LAP-V201S-WEU': airBaseV2_1.VeSyncAirBaseV2,
51
+ 'LAP-V201S-WUS': airBaseV2_1.VeSyncAirBaseV2,
52
+ 'LAP-V201-AUSR': airBaseV2_1.VeSyncAirBaseV2,
53
+ 'LAP-V201S-AUSR': airBaseV2_1.VeSyncAirBaseV2,
54
+ 'LAP-V201S-AEUR': airBaseV2_1.VeSyncAirBaseV2,
55
+ // EverestAir Series - Using VeSyncAirBaseV2
56
+ 'LAP-EL551S-AUS': airBaseV2_1.VeSyncAirBaseV2,
57
+ 'LAP-EL551S-AEUR': airBaseV2_1.VeSyncAirBaseV2,
58
+ 'LAP-EL551S-WEU': airBaseV2_1.VeSyncAirBaseV2,
59
+ 'LAP-EL551S-WUS': airBaseV2_1.VeSyncAirBaseV2,
60
+ // LTF Series
61
+ 'LTF-F422S-KEU': towerFan_1.VeSyncTowerFan,
62
+ 'LTF-F422S-WUSR': towerFan_1.VeSyncTowerFan,
63
+ 'LTF-F422_WJP': towerFan_1.VeSyncTowerFan,
64
+ 'LTF-F422S-WUS': towerFan_1.VeSyncTowerFan,
65
+ // Classic Series
66
+ 'Classic300S': humidifier_1.VeSyncHumidifier,
67
+ 'Classic200S': humidifier_1.VeSyncHumidifier,
68
+ // Dual Series
69
+ 'Dual200S': humidifier_1.VeSyncHumidifier,
70
+ // LUH Series
71
+ 'LUH-A601S-WUSB': humid200300S_1.VeSyncHumid200300S,
72
+ 'LUH-A601S-AUSW': humid200300S_1.VeSyncHumid200300S,
73
+ 'LUH-D301S-WUSR': humid200300S_1.VeSyncHumid200300S,
74
+ 'LUH-D301S-WJP': humid200300S_1.VeSyncHumid200300S,
75
+ 'LUH-D301S-WEU': humid200300S_1.VeSyncHumid200300S,
76
+ 'LUH-A602S-WUSR': humid200300S_1.VeSyncHumid200300S,
77
+ 'LUH-A602S-WUS': humid200300S_1.VeSyncHumid200300S,
78
+ 'LUH-A602S-WEUR': humid200300S_1.VeSyncHumid200300S,
79
+ 'LUH-A602S-WEU': humid200300S_1.VeSyncHumid200300S,
80
+ 'LUH-A602S-WJP': humid200300S_1.VeSyncHumid200300S,
81
+ 'LUH-A602S-WUSC': humid200300S_1.VeSyncHumid200300S,
82
+ 'LUH-O451S-WEU': humid200300S_1.VeSyncHumid200300S,
83
+ 'LUH-O451S-WUS': humid200300S_1.VeSyncHumid200300S,
84
+ 'LUH-O451S-WUSR': humid200300S_1.VeSyncHumid200300S,
85
+ 'LUH-O601S-WUS': humid200300S_1.VeSyncHumid200300S,
86
+ 'LUH-O601S-KUS': humid200300S_1.VeSyncHumid200300S,
87
+ 'LUH-M101S-WUS': humid200300S_1.VeSyncHumid200300S,
88
+ 'LUH-M101S-WEUR': humid200300S_1.VeSyncHumid200300S,
89
+ // LEH Series
90
+ 'LEH-S601S-WUS': humid200300S_1.VeSyncHumid200300S,
91
+ 'LEH-S601S-WUSR': humid200300S_1.VeSyncHumid200300S,
92
+ // LV Series
93
+ 'LV-PUR131S': airBypass_1.VeSyncAirBypass,
94
+ 'LV-RH131S': airBypass_1.VeSyncAirBypass
95
+ };
@@ -0,0 +1,105 @@
1
+ import { VeSyncAirBaseV2 } from './airBaseV2';
2
+ import { VeSync } from '../vesync';
3
+ /**
4
+ * VeSync Tower Fan Implementation
5
+ */
6
+ export declare class VeSyncTowerFan extends VeSyncAirBaseV2 {
7
+ protected readonly towerModes: readonly ["normal", "advancedSleep", "off"];
8
+ constructor(details: Record<string, any>, manager: VeSync);
9
+ /**
10
+ * Get device details
11
+ */
12
+ getDetails(): Promise<Boolean>;
13
+ /**
14
+ * Toggle device power
15
+ */
16
+ toggleSwitch(toggle: boolean): Promise<boolean>;
17
+ /**
18
+ * Turn device on
19
+ */
20
+ turnOn(): Promise<boolean>;
21
+ /**
22
+ * Turn device off
23
+ */
24
+ turnOff(): Promise<boolean>;
25
+ /**
26
+ * Set tower fan mode
27
+ */
28
+ mode_toggle(mode: string): Promise<boolean>;
29
+ /**
30
+ * Change fan speed
31
+ */
32
+ changeFanSpeed(speed: number): Promise<boolean>;
33
+ /**
34
+ * Set normal mode
35
+ */
36
+ normal_mode(): Promise<boolean>;
37
+ /**
38
+ * Set manual mode - adapter to set mode to normal
39
+ */
40
+ manual_mode(): Promise<boolean>;
41
+ /**
42
+ * Set advanced sleep mode
43
+ */
44
+ advanced_sleep_mode(): Promise<boolean>;
45
+ /**
46
+ * Set sleep mode - adapter for advanced sleep mode
47
+ */
48
+ sleep_mode(): Promise<boolean>;
49
+ /**
50
+ * Override setMode to handle tower fan specific modes
51
+ */
52
+ setMode(mode: string): Promise<boolean>;
53
+ /**
54
+ * Get current speed
55
+ */
56
+ get speed(): number;
57
+ /**
58
+ * Get display status
59
+ */
60
+ get displayState(): boolean;
61
+ /**
62
+ * Get oscillation status
63
+ */
64
+ get oscillationState(): boolean;
65
+ /**
66
+ * Get mute status
67
+ */
68
+ get muteState(): boolean;
69
+ /**
70
+ * Get temperature (in tenths of a degree)
71
+ */
72
+ get temperature(): number;
73
+ /**
74
+ * Get humidity percentage
75
+ */
76
+ get humidity(): number;
77
+ /**
78
+ * Get thermal comfort level
79
+ */
80
+ get thermalComfort(): number;
81
+ /**
82
+ * Get sleep preferences
83
+ */
84
+ get sleepPreference(): Record<string, any>;
85
+ /**
86
+ * Get schedule count
87
+ */
88
+ get scheduleCount(): number;
89
+ /**
90
+ * Get error code
91
+ */
92
+ get errorCode(): number;
93
+ /**
94
+ * Turn oscillation on
95
+ */
96
+ setOscillationOn(): Promise<boolean>;
97
+ /**
98
+ * Turn oscillation off
99
+ */
100
+ setOscillationOff(): Promise<boolean>;
101
+ /**
102
+ * Display device info
103
+ */
104
+ display(): void;
105
+ }