tsvesync 1.0.49 → 1.0.51
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/vesyncFan.d.ts +20 -3
- package/dist/lib/vesyncFan.js +129 -67
- package/dist/lib/vesyncFanImpl.d.ts +29 -2
- package/dist/lib/vesyncFanImpl.js +179 -88
- package/package.json +1 -1
- package/src/lib/vesyncFan.ts +149 -68
- package/src/lib/vesyncFanImpl.ts +187 -85
package/dist/lib/vesyncFan.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ interface FanConfig {
|
|
|
7
7
|
[key: string]: {
|
|
8
8
|
module: 'VeSyncAirBypass' | 'VeSyncHumidifier' | 'VeSyncWarmHumidifier' | 'VeSyncTowerFan' | 'VeSyncAirBaseV2';
|
|
9
9
|
features: string[];
|
|
10
|
+
levels?: number[];
|
|
10
11
|
};
|
|
11
12
|
}
|
|
12
13
|
export declare const fanConfig: FanConfig;
|
|
@@ -14,14 +15,30 @@ export declare const fanConfig: FanConfig;
|
|
|
14
15
|
* Base class for VeSync Fans
|
|
15
16
|
*/
|
|
16
17
|
export declare abstract class VeSyncFan extends VeSyncBaseDevice {
|
|
17
|
-
protected details:
|
|
18
|
+
protected details: {
|
|
19
|
+
mode?: string;
|
|
20
|
+
speed?: number;
|
|
21
|
+
filter_life?: number;
|
|
22
|
+
screen_status?: string;
|
|
23
|
+
child_lock?: boolean;
|
|
24
|
+
air_quality?: string;
|
|
25
|
+
humidity?: number;
|
|
26
|
+
mist_level?: number;
|
|
27
|
+
warm_level?: number;
|
|
28
|
+
warm_enabled?: boolean;
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
};
|
|
18
31
|
protected mode_dict: Record<string, any>;
|
|
19
32
|
protected speed_dict: Record<string, any>;
|
|
20
|
-
protected features: string[];
|
|
21
33
|
protected _timer: number | {
|
|
22
34
|
duration: number;
|
|
23
35
|
action: string;
|
|
24
36
|
} | null;
|
|
37
|
+
protected config: {
|
|
38
|
+
module: 'VeSyncAirBypass' | 'VeSyncHumidifier' | 'VeSyncWarmHumidifier' | 'VeSyncTowerFan' | 'VeSyncAirBaseV2';
|
|
39
|
+
features: string[];
|
|
40
|
+
levels?: number[];
|
|
41
|
+
};
|
|
25
42
|
constructor(details: Record<string, any>, manager: VeSync);
|
|
26
43
|
/**
|
|
27
44
|
* Check if feature is supported
|
|
@@ -46,7 +63,7 @@ export declare abstract class VeSyncFan extends VeSyncBaseDevice {
|
|
|
46
63
|
/**
|
|
47
64
|
* Get child lock status
|
|
48
65
|
*/
|
|
49
|
-
get childLock():
|
|
66
|
+
get childLock(): boolean;
|
|
50
67
|
/**
|
|
51
68
|
* Get air quality (if supported)
|
|
52
69
|
*/
|
package/dist/lib/vesyncFan.js
CHANGED
|
@@ -11,250 +11,310 @@ exports.fanConfig = {
|
|
|
11
11
|
// Core Series
|
|
12
12
|
'Core200S': {
|
|
13
13
|
module: 'VeSyncAirBypass',
|
|
14
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
14
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
15
|
+
levels: [1, 2, 3]
|
|
15
16
|
},
|
|
16
17
|
'Core300S': {
|
|
17
18
|
module: 'VeSyncAirBypass',
|
|
18
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
19
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
20
|
+
levels: [1, 2, 3, 4]
|
|
19
21
|
},
|
|
20
22
|
'Core400S': {
|
|
21
23
|
module: 'VeSyncAirBypass',
|
|
22
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
24
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
25
|
+
levels: [1, 2, 3, 4]
|
|
23
26
|
},
|
|
24
27
|
'Core600S': {
|
|
25
28
|
module: 'VeSyncAirBypass',
|
|
26
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
29
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
30
|
+
levels: [1, 2, 3, 4]
|
|
27
31
|
},
|
|
28
32
|
// LAP Series
|
|
29
33
|
'LAP-C201S-AUSR': {
|
|
30
34
|
module: 'VeSyncAirBypass',
|
|
31
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
35
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
36
|
+
levels: [1, 2, 3]
|
|
32
37
|
},
|
|
33
38
|
'LAP-C202S-WUSR': {
|
|
34
39
|
module: 'VeSyncAirBypass',
|
|
35
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
40
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
41
|
+
levels: [1, 2, 3]
|
|
36
42
|
},
|
|
37
43
|
'LAP-C301S-WJP': {
|
|
38
44
|
module: 'VeSyncAirBypass',
|
|
39
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
45
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
46
|
+
levels: [1, 2, 3, 4]
|
|
40
47
|
},
|
|
41
48
|
'LAP-C302S-WUSB': {
|
|
42
49
|
module: 'VeSyncAirBypass',
|
|
43
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
50
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
51
|
+
levels: [1, 2, 3, 4]
|
|
44
52
|
},
|
|
45
53
|
'LAP-C301S-WAAA': {
|
|
46
54
|
module: 'VeSyncAirBypass',
|
|
47
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
55
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
56
|
+
levels: [1, 2, 3, 4]
|
|
48
57
|
},
|
|
49
58
|
'LAP-C401S-WJP': {
|
|
50
59
|
module: 'VeSyncAirBypass',
|
|
51
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
60
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
61
|
+
levels: [1, 2, 3, 4]
|
|
52
62
|
},
|
|
53
63
|
'LAP-C401S-WUSR': {
|
|
54
64
|
module: 'VeSyncAirBypass',
|
|
55
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
65
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
66
|
+
levels: [1, 2, 3, 4]
|
|
56
67
|
},
|
|
57
68
|
'LAP-C401S-WAAA': {
|
|
58
69
|
module: 'VeSyncAirBypass',
|
|
59
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
70
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
71
|
+
levels: [1, 2, 3, 4]
|
|
60
72
|
},
|
|
61
73
|
'LAP-C601S-WUS': {
|
|
62
74
|
module: 'VeSyncAirBypass',
|
|
63
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
75
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
76
|
+
levels: [1, 2, 3, 4]
|
|
64
77
|
},
|
|
65
78
|
'LAP-C601S-WUSR': {
|
|
66
79
|
module: 'VeSyncAirBypass',
|
|
67
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
80
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
81
|
+
levels: [1, 2, 3, 4]
|
|
68
82
|
},
|
|
69
83
|
'LAP-C601S-WEU': {
|
|
70
84
|
module: 'VeSyncAirBypass',
|
|
71
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
85
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
86
|
+
levels: [1, 2, 3, 4]
|
|
72
87
|
},
|
|
73
88
|
'LAP-V102S-AASR': {
|
|
74
89
|
module: 'VeSyncAirBaseV2',
|
|
75
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
90
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
91
|
+
levels: [1, 2, 3, 4]
|
|
76
92
|
},
|
|
77
93
|
'LAP-V102S-WUS': {
|
|
78
94
|
module: 'VeSyncAirBaseV2',
|
|
79
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
95
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
96
|
+
levels: [1, 2, 3, 4]
|
|
80
97
|
},
|
|
81
98
|
'LAP-V102S-WEU': {
|
|
82
99
|
module: 'VeSyncAirBaseV2',
|
|
83
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
100
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
101
|
+
levels: [1, 2, 3, 4]
|
|
84
102
|
},
|
|
85
103
|
'LAP-V102S-AUSR': {
|
|
86
104
|
module: 'VeSyncAirBaseV2',
|
|
87
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
105
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
106
|
+
levels: [1, 2, 3, 4]
|
|
88
107
|
},
|
|
89
108
|
'LAP-V102S-WJP': {
|
|
90
109
|
module: 'VeSyncAirBaseV2',
|
|
91
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer']
|
|
110
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer'],
|
|
111
|
+
levels: [1, 2, 3, 4]
|
|
92
112
|
},
|
|
93
113
|
'LAP-V201S-AASR': {
|
|
94
114
|
module: 'VeSyncAirBaseV2',
|
|
95
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection']
|
|
115
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection'],
|
|
116
|
+
levels: [1, 2, 3, 4]
|
|
96
117
|
},
|
|
97
118
|
'LAP-V201S-WJP': {
|
|
98
119
|
module: 'VeSyncAirBaseV2',
|
|
99
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection']
|
|
120
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection'],
|
|
121
|
+
levels: [1, 2, 3, 4]
|
|
100
122
|
},
|
|
101
123
|
'LAP-V201S-WEU': {
|
|
102
124
|
module: 'VeSyncAirBaseV2',
|
|
103
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection']
|
|
125
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection'],
|
|
126
|
+
levels: [1, 2, 3, 4]
|
|
104
127
|
},
|
|
105
128
|
'LAP-V201S-WUS': {
|
|
106
129
|
module: 'VeSyncAirBaseV2',
|
|
107
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection']
|
|
130
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection'],
|
|
131
|
+
levels: [1, 2, 3, 4]
|
|
108
132
|
},
|
|
109
133
|
'LAP-V201-AUSR': {
|
|
110
134
|
module: 'VeSyncAirBaseV2',
|
|
111
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection']
|
|
135
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection'],
|
|
136
|
+
levels: [1, 2, 3, 4]
|
|
112
137
|
},
|
|
113
138
|
'LAP-V201S-AUSR': {
|
|
114
139
|
module: 'VeSyncAirBaseV2',
|
|
115
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection']
|
|
140
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection'],
|
|
141
|
+
levels: [1, 2, 3, 4]
|
|
116
142
|
},
|
|
117
143
|
'LAP-V201S-AEUR': {
|
|
118
144
|
module: 'VeSyncAirBaseV2',
|
|
119
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection']
|
|
145
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'light_detection'],
|
|
146
|
+
levels: [1, 2, 3, 4]
|
|
120
147
|
},
|
|
121
148
|
'LAP-EL551S-AUS': {
|
|
122
149
|
module: 'VeSyncAirBaseV2',
|
|
123
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_rotate']
|
|
150
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_rotate'],
|
|
151
|
+
levels: [1, 2, 3]
|
|
124
152
|
},
|
|
125
153
|
'LAP-EL551S-AEUR': {
|
|
126
154
|
module: 'VeSyncAirBaseV2',
|
|
127
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_rotate']
|
|
155
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_rotate'],
|
|
156
|
+
levels: [1, 2, 3]
|
|
128
157
|
},
|
|
129
158
|
'LAP-EL551S-WEU': {
|
|
130
159
|
module: 'VeSyncAirBaseV2',
|
|
131
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_rotate']
|
|
160
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_rotate'],
|
|
161
|
+
levels: [1, 2, 3]
|
|
132
162
|
},
|
|
133
163
|
'LAP-EL551S-WUS': {
|
|
134
164
|
module: 'VeSyncAirBaseV2',
|
|
135
|
-
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_rotate']
|
|
165
|
+
features: ['display', 'child_lock', 'night_light', 'air_quality', 'timer', 'fan_rotate'],
|
|
166
|
+
levels: [1, 2, 3]
|
|
136
167
|
},
|
|
137
168
|
// LTF Series
|
|
138
169
|
'LTF-F422S-KEU': {
|
|
139
170
|
module: 'VeSyncTowerFan',
|
|
140
|
-
features: ['display', 'child_lock', 'night_light', 'timer', 'fan_speeds', 'tower_modes']
|
|
171
|
+
features: ['display', 'child_lock', 'night_light', 'timer', 'fan_speeds', 'tower_modes'],
|
|
172
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
|
141
173
|
},
|
|
142
174
|
'LTF-F422S-WUSR': {
|
|
143
175
|
module: 'VeSyncTowerFan',
|
|
144
|
-
features: ['display', 'child_lock', 'night_light', 'timer', 'fan_speeds', 'tower_modes']
|
|
176
|
+
features: ['display', 'child_lock', 'night_light', 'timer', 'fan_speeds', 'tower_modes'],
|
|
177
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
|
145
178
|
},
|
|
146
179
|
'LTF-F422_WJP': {
|
|
147
180
|
module: 'VeSyncTowerFan',
|
|
148
|
-
features: ['display', 'child_lock', 'night_light', 'timer', 'fan_speeds', 'tower_modes']
|
|
181
|
+
features: ['display', 'child_lock', 'night_light', 'timer', 'fan_speeds', 'tower_modes'],
|
|
182
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
|
149
183
|
},
|
|
150
184
|
'LTF-F422S-WUS': {
|
|
151
185
|
module: 'VeSyncTowerFan',
|
|
152
|
-
features: ['display', 'child_lock', 'night_light', 'timer', 'fan_speeds', 'tower_modes']
|
|
186
|
+
features: ['display', 'child_lock', 'night_light', 'timer', 'fan_speeds', 'tower_modes'],
|
|
187
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
|
153
188
|
},
|
|
154
189
|
// Classic Series
|
|
155
190
|
'Classic300S': {
|
|
156
191
|
module: 'VeSyncHumidifier',
|
|
157
|
-
features: ['display', 'humidity', 'mist', 'timer', 'auto_mode']
|
|
192
|
+
features: ['display', 'humidity', 'mist', 'timer', 'auto_mode'],
|
|
193
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
158
194
|
},
|
|
159
195
|
'Classic200S': {
|
|
160
196
|
module: 'VeSyncHumidifier',
|
|
161
|
-
features: ['display', 'humidity', 'mist', 'timer', 'auto_mode']
|
|
197
|
+
features: ['display', 'humidity', 'mist', 'timer', 'auto_mode'],
|
|
198
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
162
199
|
},
|
|
163
200
|
// Dual Series
|
|
164
201
|
'Dual200S': {
|
|
165
202
|
module: 'VeSyncHumidifier',
|
|
166
|
-
features: ['display', 'humidity', 'mist', 'timer', 'auto_mode']
|
|
203
|
+
features: ['display', 'humidity', 'mist', 'timer', 'auto_mode'],
|
|
204
|
+
levels: [1, 2]
|
|
167
205
|
},
|
|
168
206
|
// LUH Series
|
|
169
207
|
'LUH-A601S-WUSB': {
|
|
170
208
|
module: 'VeSyncWarmHumidifier',
|
|
171
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
209
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
210
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
172
211
|
},
|
|
173
212
|
'LUH-A601S-AUSW': {
|
|
174
213
|
module: 'VeSyncWarmHumidifier',
|
|
175
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
214
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
215
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
176
216
|
},
|
|
177
217
|
'LUH-D301S-WUSR': {
|
|
178
218
|
module: 'VeSyncWarmHumidifier',
|
|
179
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
219
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
220
|
+
levels: [1, 2]
|
|
180
221
|
},
|
|
181
222
|
'LUH-D301S-WJP': {
|
|
182
223
|
module: 'VeSyncWarmHumidifier',
|
|
183
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
224
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
225
|
+
levels: [1, 2]
|
|
184
226
|
},
|
|
185
227
|
'LUH-D301S-WEU': {
|
|
186
228
|
module: 'VeSyncWarmHumidifier',
|
|
187
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
229
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
230
|
+
levels: [1, 2]
|
|
188
231
|
},
|
|
189
232
|
'LUH-A602S-WUSR': {
|
|
190
233
|
module: 'VeSyncWarmHumidifier',
|
|
191
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
234
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
235
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
192
236
|
},
|
|
193
237
|
'LUH-A602S-WUS': {
|
|
194
238
|
module: 'VeSyncWarmHumidifier',
|
|
195
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
239
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
240
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
196
241
|
},
|
|
197
242
|
'LUH-A602S-WEUR': {
|
|
198
243
|
module: 'VeSyncWarmHumidifier',
|
|
199
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
244
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
245
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
200
246
|
},
|
|
201
247
|
'LUH-A602S-WEU': {
|
|
202
248
|
module: 'VeSyncWarmHumidifier',
|
|
203
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
249
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
250
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
204
251
|
},
|
|
205
252
|
'LUH-A602S-WJP': {
|
|
206
253
|
module: 'VeSyncWarmHumidifier',
|
|
207
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
254
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
255
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
208
256
|
},
|
|
209
257
|
'LUH-A602S-WUSC': {
|
|
210
258
|
module: 'VeSyncWarmHumidifier',
|
|
211
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
259
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
260
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
212
261
|
},
|
|
213
262
|
'LUH-O451S-WEU': {
|
|
214
263
|
module: 'VeSyncWarmHumidifier',
|
|
215
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
264
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
265
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
216
266
|
},
|
|
217
267
|
'LUH-O451S-WUS': {
|
|
218
268
|
module: 'VeSyncWarmHumidifier',
|
|
219
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
269
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
270
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
220
271
|
},
|
|
221
272
|
'LUH-O451S-WUSR': {
|
|
222
273
|
module: 'VeSyncWarmHumidifier',
|
|
223
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
274
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
275
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
224
276
|
},
|
|
225
277
|
'LUH-O601S-WUS': {
|
|
226
278
|
module: 'VeSyncWarmHumidifier',
|
|
227
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
279
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
280
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
228
281
|
},
|
|
229
282
|
'LUH-O601S-KUS': {
|
|
230
283
|
module: 'VeSyncWarmHumidifier',
|
|
231
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
284
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
285
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
232
286
|
},
|
|
233
287
|
'LUH-M101S-WUS': {
|
|
234
288
|
module: 'VeSyncWarmHumidifier',
|
|
235
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
289
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
290
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
236
291
|
},
|
|
237
292
|
'LUH-M101S-WEUR': {
|
|
238
293
|
module: 'VeSyncWarmHumidifier',
|
|
239
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode']
|
|
294
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode'],
|
|
295
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
240
296
|
},
|
|
241
297
|
// LEH Series
|
|
242
298
|
'LEH-S601S-WUS': {
|
|
243
299
|
module: 'VeSyncWarmHumidifier',
|
|
244
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode', 'drying']
|
|
300
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode', 'drying'],
|
|
301
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
245
302
|
},
|
|
246
303
|
'LEH-S601S-WUSR': {
|
|
247
304
|
module: 'VeSyncWarmHumidifier',
|
|
248
|
-
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode', 'drying']
|
|
305
|
+
features: ['display', 'humidity', 'mist', 'warm', 'timer', 'auto_mode', 'drying'],
|
|
306
|
+
levels: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
249
307
|
},
|
|
250
308
|
// LV Series
|
|
251
309
|
'LV-PUR131S': {
|
|
252
310
|
module: 'VeSyncAirBypass',
|
|
253
|
-
features: ['air_quality', 'display', 'child_lock', 'night_light', 'timer']
|
|
311
|
+
features: ['air_quality', 'display', 'child_lock', 'night_light', 'timer'],
|
|
312
|
+
levels: [1, 2, 3]
|
|
254
313
|
},
|
|
255
314
|
'LV-RH131S': {
|
|
256
315
|
module: 'VeSyncAirBypass',
|
|
257
|
-
features: ['display', 'child_lock', 'night_light', 'timer']
|
|
316
|
+
features: ['display', 'child_lock', 'night_light', 'timer'],
|
|
317
|
+
levels: [1, 2, 3]
|
|
258
318
|
}
|
|
259
319
|
};
|
|
260
320
|
/**
|
|
@@ -262,21 +322,23 @@ exports.fanConfig = {
|
|
|
262
322
|
*/
|
|
263
323
|
class VeSyncFan extends vesyncBaseDevice_1.VeSyncBaseDevice {
|
|
264
324
|
constructor(details, manager) {
|
|
265
|
-
var _a;
|
|
266
325
|
super(details, manager);
|
|
267
326
|
this.details = {};
|
|
268
327
|
this.mode_dict = {};
|
|
269
328
|
this.speed_dict = {};
|
|
270
|
-
this.features = [];
|
|
271
329
|
this._timer = null;
|
|
272
330
|
this.details = details;
|
|
273
|
-
this.
|
|
331
|
+
this.config = exports.fanConfig[this.deviceType] || {
|
|
332
|
+
module: 'VeSyncAirBypass',
|
|
333
|
+
features: [],
|
|
334
|
+
levels: []
|
|
335
|
+
};
|
|
274
336
|
}
|
|
275
337
|
/**
|
|
276
338
|
* Check if feature is supported
|
|
277
339
|
*/
|
|
278
340
|
hasFeature(feature) {
|
|
279
|
-
return this.features.includes(feature);
|
|
341
|
+
return this.config.features.includes(feature);
|
|
280
342
|
}
|
|
281
343
|
/**
|
|
282
344
|
* Get current mode
|
|
@@ -311,7 +373,7 @@ class VeSyncFan extends vesyncBaseDevice_1.VeSyncBaseDevice {
|
|
|
311
373
|
*/
|
|
312
374
|
get childLock() {
|
|
313
375
|
var _a;
|
|
314
|
-
return (_a = this.details.child_lock) !== null && _a !== void 0 ? _a :
|
|
376
|
+
return (_a = this.details.child_lock) !== null && _a !== void 0 ? _a : false;
|
|
315
377
|
}
|
|
316
378
|
/**
|
|
317
379
|
* Get air quality (if supported)
|
|
@@ -364,7 +426,7 @@ class VeSyncFan extends vesyncBaseDevice_1.VeSyncBaseDevice {
|
|
|
364
426
|
info.push(['Screen Status: ', this.screenStatus]);
|
|
365
427
|
}
|
|
366
428
|
if (this.hasFeature('child_lock')) {
|
|
367
|
-
info.push(['Child Lock: ', this.childLock]);
|
|
429
|
+
info.push(['Child Lock: ', this.childLock ? 'Enabled' : 'Disabled']);
|
|
368
430
|
}
|
|
369
431
|
if (this.hasFeature('air_quality')) {
|
|
370
432
|
info.push(['Air Quality: ', this.airQuality]);
|
|
@@ -405,7 +467,7 @@ class VeSyncFan extends vesyncBaseDevice_1.VeSyncBaseDevice {
|
|
|
405
467
|
details['Screen Status'] = this.screenStatus;
|
|
406
468
|
}
|
|
407
469
|
if (this.hasFeature('child_lock')) {
|
|
408
|
-
details['Child Lock'] = this.childLock;
|
|
470
|
+
details['Child Lock'] = this.childLock ? 'Enabled' : 'Disabled';
|
|
409
471
|
}
|
|
410
472
|
if (this.hasFeature('air_quality')) {
|
|
411
473
|
details['Air Quality'] = this.airQuality;
|
|
@@ -8,7 +8,6 @@ import { VeSync } from './vesync';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class VeSyncAirBypass extends VeSyncFan {
|
|
10
10
|
protected readonly modes: readonly ["auto", "manual", "sleep"];
|
|
11
|
-
protected readonly speeds: number[];
|
|
12
11
|
protected readonly displayModes: readonly ["on", "off"];
|
|
13
12
|
protected readonly childLockModes: readonly ["on", "off"];
|
|
14
13
|
constructor(details: Record<string, any>, manager: VeSync);
|
|
@@ -92,11 +91,40 @@ export declare class VeSyncHumidifier extends VeSyncFan {
|
|
|
92
91
|
min: number;
|
|
93
92
|
max: number;
|
|
94
93
|
};
|
|
94
|
+
protected readonly states: readonly ["inactive", "idle", "humidifying"];
|
|
95
95
|
constructor(details: Record<string, any>, manager: VeSync);
|
|
96
|
+
/**
|
|
97
|
+
* Get current operational state
|
|
98
|
+
*/
|
|
99
|
+
get currentState(): string;
|
|
100
|
+
/**
|
|
101
|
+
* Get water level percentage
|
|
102
|
+
*/
|
|
103
|
+
get waterLevel(): number;
|
|
104
|
+
/**
|
|
105
|
+
* Get water tank status
|
|
106
|
+
*/
|
|
107
|
+
get waterTankLifted(): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Get oscillation state
|
|
110
|
+
*/
|
|
111
|
+
get oscillationEnabled(): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Set oscillation state
|
|
114
|
+
*/
|
|
115
|
+
setOscillation(enabled: boolean): Promise<boolean>;
|
|
96
116
|
/**
|
|
97
117
|
* Get device details
|
|
98
118
|
*/
|
|
99
119
|
getDetails(): Promise<Boolean>;
|
|
120
|
+
/**
|
|
121
|
+
* Display device info
|
|
122
|
+
*/
|
|
123
|
+
display(): void;
|
|
124
|
+
/**
|
|
125
|
+
* Return JSON details
|
|
126
|
+
*/
|
|
127
|
+
displayJSON(): string;
|
|
100
128
|
/**
|
|
101
129
|
* Turn device on
|
|
102
130
|
*/
|
|
@@ -324,7 +352,6 @@ export declare class VeSyncAirBaseV2 extends VeSyncAirBypass {
|
|
|
324
352
|
*/
|
|
325
353
|
export declare class VeSyncTowerFan extends VeSyncAirBaseV2 {
|
|
326
354
|
protected readonly towerModes: readonly ["normal", "advancedSleep", "off"];
|
|
327
|
-
protected readonly speeds: number[];
|
|
328
355
|
constructor(details: Record<string, any>, manager: VeSync);
|
|
329
356
|
/**
|
|
330
357
|
* Get timer status (in seconds)
|