tsvesync 1.0.60 → 1.0.61
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/vesyncFanImpl.js +15 -18
- package/package.json +1 -1
- package/src/lib/vesyncFanImpl.ts +15 -15
|
@@ -209,12 +209,11 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
|
|
|
209
209
|
* Change fan speed
|
|
210
210
|
*/
|
|
211
211
|
async changeFanSpeed(speed) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
212
|
+
// const speeds = this.config.levels ?? [];
|
|
213
|
+
// if (!speeds.includes(speed)) {
|
|
214
|
+
// logger.error(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')} for device: ${this.deviceName}`);
|
|
215
|
+
// return false;
|
|
216
|
+
// }
|
|
218
217
|
logger_1.logger.info(`Changing fan speed to ${speed} for device: ${this.deviceName}`);
|
|
219
218
|
const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
|
|
220
219
|
...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
|
|
@@ -1211,12 +1210,11 @@ class VeSyncAirBaseV2 extends VeSyncAirBypass {
|
|
|
1211
1210
|
* Change fan speed
|
|
1212
1211
|
*/
|
|
1213
1212
|
async changeFanSpeed(speed) {
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
}
|
|
1213
|
+
// const speeds = this.config.levels ?? [];
|
|
1214
|
+
// if (!speeds.includes(speed)) {
|
|
1215
|
+
// logger.error(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')} for device: ${this.deviceName}`);
|
|
1216
|
+
// return false;
|
|
1217
|
+
// }
|
|
1220
1218
|
logger_1.logger.info(`Changing fan speed to ${speed} for device: ${this.deviceName}`);
|
|
1221
1219
|
const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
|
|
1222
1220
|
...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
|
|
@@ -1619,12 +1617,11 @@ class VeSyncTowerFan extends VeSyncAirBaseV2 {
|
|
|
1619
1617
|
* Change fan speed
|
|
1620
1618
|
*/
|
|
1621
1619
|
async changeFanSpeed(speed) {
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
}
|
|
1620
|
+
// const speeds = this.config.levels ?? [];
|
|
1621
|
+
// if (!speeds.includes(speed)) {
|
|
1622
|
+
// logger.debug(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')}`);
|
|
1623
|
+
// return false;
|
|
1624
|
+
// }
|
|
1628
1625
|
const [head, body] = this.buildApiDict('setLevel');
|
|
1629
1626
|
body.payload.data = {
|
|
1630
1627
|
levelIdx: 0,
|
package/package.json
CHANGED
package/src/lib/vesyncFanImpl.ts
CHANGED
|
@@ -257,11 +257,11 @@ export class VeSyncAirBypass extends VeSyncFan {
|
|
|
257
257
|
* Change fan speed
|
|
258
258
|
*/
|
|
259
259
|
async changeFanSpeed(speed: number): Promise<boolean> {
|
|
260
|
-
const speeds = this.config.levels ?? [];
|
|
261
|
-
if (!speeds.includes(speed)) {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}
|
|
260
|
+
// const speeds = this.config.levels ?? [];
|
|
261
|
+
// if (!speeds.includes(speed)) {
|
|
262
|
+
// logger.error(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')} for device: ${this.deviceName}`);
|
|
263
|
+
// return false;
|
|
264
|
+
// }
|
|
265
265
|
|
|
266
266
|
logger.info(`Changing fan speed to ${speed} for device: ${this.deviceName}`);
|
|
267
267
|
const [response, status] = await this.callApi(
|
|
@@ -1469,11 +1469,11 @@ export class VeSyncAirBaseV2 extends VeSyncAirBypass {
|
|
|
1469
1469
|
* Change fan speed
|
|
1470
1470
|
*/
|
|
1471
1471
|
async changeFanSpeed(speed: number): Promise<boolean> {
|
|
1472
|
-
const speeds = this.config.levels ?? [];
|
|
1473
|
-
if (!speeds.includes(speed)) {
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
}
|
|
1472
|
+
// const speeds = this.config.levels ?? [];
|
|
1473
|
+
// if (!speeds.includes(speed)) {
|
|
1474
|
+
// logger.error(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')} for device: ${this.deviceName}`);
|
|
1475
|
+
// return false;
|
|
1476
|
+
// }
|
|
1477
1477
|
|
|
1478
1478
|
logger.info(`Changing fan speed to ${speed} for device: ${this.deviceName}`);
|
|
1479
1479
|
const [response, status] = await this.callApi(
|
|
@@ -1998,11 +1998,11 @@ export class VeSyncTowerFan extends VeSyncAirBaseV2 {
|
|
|
1998
1998
|
* Change fan speed
|
|
1999
1999
|
*/
|
|
2000
2000
|
async changeFanSpeed(speed: number): Promise<boolean> {
|
|
2001
|
-
const speeds = this.config.levels ?? [];
|
|
2002
|
-
if (!speeds.includes(speed)) {
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
}
|
|
2001
|
+
// const speeds = this.config.levels ?? [];
|
|
2002
|
+
// if (!speeds.includes(speed)) {
|
|
2003
|
+
// logger.debug(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')}`);
|
|
2004
|
+
// return false;
|
|
2005
|
+
// }
|
|
2006
2006
|
|
|
2007
2007
|
const [head, body] = this.buildApiDict('setLevel');
|
|
2008
2008
|
body.payload.data = {
|