@switchbot/homebridge-switchbot 3.5.1 → 3.5.2-beta.0

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.
Files changed (65) hide show
  1. package/.github/npm-version-script.cjs +81 -0
  2. package/dist/device/blindtilt.js +1 -1
  3. package/dist/device/blindtilt.js.map +1 -1
  4. package/dist/device/bot.js +1 -1
  5. package/dist/device/bot.js.map +1 -1
  6. package/dist/device/ceilinglight.js +1 -1
  7. package/dist/device/ceilinglight.js.map +1 -1
  8. package/dist/device/colorbulb.js +1 -1
  9. package/dist/device/colorbulb.js.map +1 -1
  10. package/dist/device/contact.js +1 -1
  11. package/dist/device/contact.js.map +1 -1
  12. package/dist/device/curtain.js +1 -1
  13. package/dist/device/curtain.js.map +1 -1
  14. package/dist/device/device.d.ts +1 -1
  15. package/dist/device/device.d.ts.map +1 -1
  16. package/dist/device/device.js +4 -2
  17. package/dist/device/device.js.map +1 -1
  18. package/dist/device/fan.js +1 -1
  19. package/dist/device/fan.js.map +1 -1
  20. package/dist/device/hub.js +1 -1
  21. package/dist/device/hub.js.map +1 -1
  22. package/dist/device/humidifier.js +1 -1
  23. package/dist/device/humidifier.js.map +1 -1
  24. package/dist/device/iosensor.js +1 -1
  25. package/dist/device/iosensor.js.map +1 -1
  26. package/dist/device/lightstrip.js +1 -1
  27. package/dist/device/lightstrip.js.map +1 -1
  28. package/dist/device/lock.js +1 -1
  29. package/dist/device/lock.js.map +1 -1
  30. package/dist/device/meter.js +1 -1
  31. package/dist/device/meter.js.map +1 -1
  32. package/dist/device/meterplus.js +1 -1
  33. package/dist/device/meterplus.js.map +1 -1
  34. package/dist/device/motion.js +1 -1
  35. package/dist/device/motion.js.map +1 -1
  36. package/dist/device/plug.js +1 -1
  37. package/dist/device/plug.js.map +1 -1
  38. package/dist/device/robotvacuumcleaner.js +1 -1
  39. package/dist/device/robotvacuumcleaner.js.map +1 -1
  40. package/dist/device/waterdetector.js +1 -1
  41. package/dist/device/waterdetector.js.map +1 -1
  42. package/dist/irdevice/irdevice.d.ts +1 -1
  43. package/dist/irdevice/irdevice.js +1 -1
  44. package/dist/irdevice/irdevice.js.map +1 -1
  45. package/package.json +7 -7
  46. package/src/device/blindtilt.ts +1 -1
  47. package/src/device/bot.ts +1 -1
  48. package/src/device/ceilinglight.ts +1 -1
  49. package/src/device/colorbulb.ts +1 -1
  50. package/src/device/contact.ts +1 -1
  51. package/src/device/curtain.ts +1 -1
  52. package/src/device/device.ts +4 -2
  53. package/src/device/fan.ts +1 -1
  54. package/src/device/hub.ts +1 -1
  55. package/src/device/humidifier.ts +1 -1
  56. package/src/device/iosensor.ts +1 -1
  57. package/src/device/lightstrip.ts +1 -1
  58. package/src/device/lock.ts +1 -1
  59. package/src/device/meter.ts +1 -1
  60. package/src/device/meterplus.ts +1 -1
  61. package/src/device/motion.ts +1 -1
  62. package/src/device/plug.ts +1 -1
  63. package/src/device/robotvacuumcleaner.ts +1 -1
  64. package/src/device/waterdetector.ts +1 -1
  65. package/src/irdevice/irdevice.ts +1 -1
@@ -361,7 +361,7 @@ export class Meter extends deviceBase {
361
361
  }
362
362
 
363
363
  async BLERefreshConnection(switchbot: any): Promise<void> {
364
- await this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${JSON.stringify(switchbot)}`);
364
+ await this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${switchbot}`);
365
365
  if (this.platform.config.credentials?.token && this.device.connectionType === 'BLE/OpenAPI') {
366
366
  await this.warnLog('Using OpenAPI Connection to Refresh Status');
367
367
  await this.openAPIRefreshStatus();
@@ -362,7 +362,7 @@ export class MeterPlus extends deviceBase {
362
362
  }
363
363
 
364
364
  async BLERefreshConnection(switchbot: any): Promise<void> {
365
- await this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${JSON.stringify(switchbot)}`);
365
+ await this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${switchbot}`);
366
366
  if (this.platform.config.credentials?.token && this.device.connectionType === 'BLE/OpenAPI') {
367
367
  await this.warnLog('Using OpenAPI Connection to Refresh Status');
368
368
  await this.openAPIRefreshStatus();
@@ -331,7 +331,7 @@ export class Motion extends deviceBase {
331
331
  }
332
332
 
333
333
  async BLERefreshConnection(switchbot: any): Promise<void> {
334
- await this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${JSON.stringify(switchbot)}`);
334
+ await this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${switchbot}`);
335
335
  if (this.platform.config.credentials?.token && this.device.connectionType === 'BLE/OpenAPI') {
336
336
  await this.warnLog('Using OpenAPI Connection to Refresh Status');
337
337
  await this.openAPIRefreshStatus();
@@ -351,7 +351,7 @@ export class Plug extends deviceBase {
351
351
  }
352
352
 
353
353
  async BLERefreshConnection(switchbot: any): Promise<void> {
354
- await this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${JSON.stringify(switchbot)}`);
354
+ await this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${switchbot}`);
355
355
  if (this.platform.config.credentials?.token && this.device.connectionType === 'BLE/OpenAPI') {
356
356
  await this.warnLog('Using OpenAPI Connection to Refresh Status');
357
357
  await this.openAPIRefreshStatus();
@@ -511,7 +511,7 @@ export class RobotVacuumCleaner extends deviceBase {
511
511
  }
512
512
 
513
513
  async BLERefreshConnection(switchbot: any): Promise<void> {
514
- await this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${JSON.stringify(switchbot)}`);
514
+ await this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${switchbot}`);
515
515
  if (this.platform.config.credentials?.token && this.device.connectionType === 'BLE/OpenAPI') {
516
516
  await this.warnLog('Using OpenAPI Connection to Refresh Status');
517
517
  await this.openAPIRefreshStatus();
@@ -328,7 +328,7 @@ export class WaterDetector extends deviceBase {
328
328
  }
329
329
 
330
330
  async BLERefreshConnection(switchbot: any): Promise<void> {
331
- await this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${JSON.stringify(switchbot)}`);
331
+ await this.errorLog(`wasn't able to establish BLE Connection, node-switchbot: ${switchbot}`);
332
332
  if (this.platform.config.credentials?.token && this.device.connectionType === 'BLE/OpenAPI') {
333
333
  await this.warnLog('Using OpenAPI Connection to Refresh Status');
334
334
  await this.openAPIRefreshStatus();
@@ -179,7 +179,7 @@ export abstract class irdeviceBase {
179
179
  }
180
180
 
181
181
  async successfulStatusCodes(statusCode: any, deviceStatus: any) {
182
- return await this.successfulStatusCodes(statusCode, deviceStatus);
182
+ return (statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100);
183
183
  }
184
184
 
185
185
  /**