tsvesync 1.0.54 → 1.0.56

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.
@@ -16,10 +16,7 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
16
16
  this.modes = ['auto', 'manual', 'sleep'];
17
17
  this.displayModes = ['on', 'off'];
18
18
  this.childLockModes = ['on', 'off'];
19
- logger_1.logger.info(`Device Type: ${this.deviceType}`);
20
- logger_1.logger.info(`Device Details: ${JSON.stringify(details)}`);
21
- logger_1.logger.info(`Config: ${JSON.stringify(this.config)}`);
22
- logger_1.logger.info(`Initialized VeSyncAirBypass device: ${this.deviceName}`);
19
+ logger_1.logger.debug(`Initialized VeSyncAirBypass device: ${this.deviceName}`);
23
20
  }
24
21
  /**
25
22
  * Build API dictionary
@@ -213,10 +210,12 @@ class VeSyncAirBypass extends vesyncFan_1.VeSyncFan {
213
210
  * Change fan speed
214
211
  */
215
212
  async changeFanSpeed(speed) {
216
- var _a;
217
- const speeds = (_a = this.config.levels) !== null && _a !== void 0 ? _a : [];
213
+ var _a, _b;
214
+ logger_1.logger.debug(`Attempting to change fan speed to ${speed} for device: ${this.deviceName}`);
215
+ logger_1.logger.debug(`Available speeds: ${(_a = this.config.levels) === null || _a === void 0 ? void 0 : _a.join(', ')}`);
216
+ const speeds = (_b = this.config.levels) !== null && _b !== void 0 ? _b : [];
218
217
  if (!speeds.includes(speed)) {
219
- logger_1.logger.error(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')} for device: ${this.deviceName}`);
218
+ logger_1.logger.debug(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')}`);
220
219
  return false;
221
220
  }
222
221
  logger_1.logger.info(`Changing fan speed to ${speed} for device: ${this.deviceName}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsvesync",
3
- "version": "1.0.54",
3
+ "version": "1.0.56",
4
4
  "description": "A TypeScript library for interacting with VeSync smart home devices",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,10 +17,7 @@ export class VeSyncAirBypass extends VeSyncFan {
17
17
 
18
18
  constructor(details: Record<string, any>, manager: VeSync) {
19
19
  super(details, manager);
20
- logger.info(`Device Type: ${this.deviceType}`);
21
- logger.info(`Device Details: ${JSON.stringify(details)}`);
22
- logger.info(`Config: ${JSON.stringify(this.config)}`);
23
- logger.info(`Initialized VeSyncAirBypass device: ${this.deviceName}`);
20
+ logger.debug(`Initialized VeSyncAirBypass device: ${this.deviceName}`);
24
21
  }
25
22
 
26
23
  /**
@@ -261,9 +258,12 @@ export class VeSyncAirBypass extends VeSyncFan {
261
258
  * Change fan speed
262
259
  */
263
260
  async changeFanSpeed(speed: number): Promise<boolean> {
261
+ logger.debug(`Attempting to change fan speed to ${speed} for device: ${this.deviceName}`);
262
+ logger.debug(`Available speeds: ${this.config.levels?.join(', ')}`);
263
+
264
264
  const speeds = this.config.levels ?? [];
265
265
  if (!speeds.includes(speed)) {
266
- logger.error(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')} for device: ${this.deviceName}`);
266
+ logger.debug(`Invalid speed: ${speed}. Must be one of: ${speeds.join(', ')}`);
267
267
  return false;
268
268
  }
269
269