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