tsvesync 1.0.57 → 1.0.58
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 +16 -18
- package/package.json +1 -1
- package/src/lib/vesyncFanImpl.ts +15 -15
|
@@ -210,14 +210,14 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
|
|
|
210
210
|
* Change fan speed
|
|
211
211
|
*/
|
|
212
212
|
async changeFanSpeed(speed) {
|
|
213
|
-
var _a
|
|
213
|
+
var _a;
|
|
214
214
|
logger_1.logger.debug(`Attempting to change fan speed to ${speed} for device: ${this.deviceName}`);
|
|
215
215
|
logger_1.logger.debug(`Available speeds: ${(_a = this.config.levels) === null || _a === void 0 ? void 0 : _a.join(', ')}`);
|
|
216
|
-
const speeds =
|
|
217
|
-
if (!speeds.includes(speed)) {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}
|
|
216
|
+
// const speeds = this.config.levels ?? [];
|
|
217
|
+
// if (!speeds.includes(speed)) {
|
|
218
|
+
// logger.debug(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')}`);
|
|
219
|
+
// return false;
|
|
220
|
+
// }
|
|
221
221
|
logger_1.logger.info(`Changing fan speed to ${speed} for device: ${this.deviceName}`);
|
|
222
222
|
const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
|
|
223
223
|
...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
|
|
@@ -1304,12 +1304,11 @@ class VeSyncAirBaseV2 extends VeSyncAirBypass {
|
|
|
1304
1304
|
* Change fan speed
|
|
1305
1305
|
*/
|
|
1306
1306
|
async changeFanSpeed(speed) {
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
}
|
|
1307
|
+
// const speeds = this.config.levels ?? [];
|
|
1308
|
+
// if (!speeds.includes(speed)) {
|
|
1309
|
+
// logger.error(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')} for device: ${this.deviceName}`);
|
|
1310
|
+
// return false;
|
|
1311
|
+
// }
|
|
1313
1312
|
logger_1.logger.info(`Changing fan speed to ${speed} for device: ${this.deviceName}`);
|
|
1314
1313
|
const [response, status] = await this.callApi('/cloud/v2/deviceManaged/bypassV2', 'post', {
|
|
1315
1314
|
...helpers_1.Helpers.reqBody(this.manager, 'bypassV2'),
|
|
@@ -1713,12 +1712,11 @@ class VeSyncTowerFan extends VeSyncAirBaseV2 {
|
|
|
1713
1712
|
* Change fan speed
|
|
1714
1713
|
*/
|
|
1715
1714
|
async changeFanSpeed(speed) {
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
}
|
|
1715
|
+
// const speeds = this.config.levels ?? [];
|
|
1716
|
+
// if (!speeds.includes(speed)) {
|
|
1717
|
+
// logger.debug(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')}`);
|
|
1718
|
+
// return false;
|
|
1719
|
+
// }
|
|
1722
1720
|
const [head, body] = this.buildApiDict('setLevel');
|
|
1723
1721
|
body.payload.data = {
|
|
1724
1722
|
levelIdx: 0,
|
package/package.json
CHANGED
package/src/lib/vesyncFanImpl.ts
CHANGED
|
@@ -261,11 +261,11 @@ export class VeSyncAirBypass extends VeSyncFan {
|
|
|
261
261
|
logger.debug(`Attempting to change fan speed to ${speed} for device: ${this.deviceName}`);
|
|
262
262
|
logger.debug(`Available speeds: ${this.config.levels?.join(', ')}`);
|
|
263
263
|
|
|
264
|
-
const speeds = this.config.levels ?? [];
|
|
265
|
-
if (!speeds.includes(speed)) {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}
|
|
264
|
+
// const speeds = this.config.levels ?? [];
|
|
265
|
+
// if (!speeds.includes(speed)) {
|
|
266
|
+
// logger.debug(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')}`);
|
|
267
|
+
// return false;
|
|
268
|
+
// }
|
|
269
269
|
|
|
270
270
|
logger.info(`Changing fan speed to ${speed} for device: ${this.deviceName}`);
|
|
271
271
|
const [response, status] = await this.callApi(
|
|
@@ -1576,11 +1576,11 @@ export class VeSyncAirBaseV2 extends VeSyncAirBypass {
|
|
|
1576
1576
|
* Change fan speed
|
|
1577
1577
|
*/
|
|
1578
1578
|
async changeFanSpeed(speed: number): Promise<boolean> {
|
|
1579
|
-
const speeds = this.config.levels ?? [];
|
|
1580
|
-
if (!speeds.includes(speed)) {
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
}
|
|
1579
|
+
// const speeds = this.config.levels ?? [];
|
|
1580
|
+
// if (!speeds.includes(speed)) {
|
|
1581
|
+
// logger.error(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')} for device: ${this.deviceName}`);
|
|
1582
|
+
// return false;
|
|
1583
|
+
// }
|
|
1584
1584
|
|
|
1585
1585
|
logger.info(`Changing fan speed to ${speed} for device: ${this.deviceName}`);
|
|
1586
1586
|
const [response, status] = await this.callApi(
|
|
@@ -2106,11 +2106,11 @@ export class VeSyncTowerFan extends VeSyncAirBaseV2 {
|
|
|
2106
2106
|
* Change fan speed
|
|
2107
2107
|
*/
|
|
2108
2108
|
async changeFanSpeed(speed: number): Promise<boolean> {
|
|
2109
|
-
const speeds = this.config.levels ?? [];
|
|
2110
|
-
if (!speeds.includes(speed)) {
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
}
|
|
2109
|
+
// const speeds = this.config.levels ?? [];
|
|
2110
|
+
// if (!speeds.includes(speed)) {
|
|
2111
|
+
// logger.debug(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')}`);
|
|
2112
|
+
// return false;
|
|
2113
|
+
// }
|
|
2114
2114
|
|
|
2115
2115
|
const [head, body] = this.buildApiDict('setLevel');
|
|
2116
2116
|
body.payload.data = {
|