@switchbot/homebridge-switchbot 2.2.2-beta.18 → 2.2.2-beta.19

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 (61) hide show
  1. package/dist/device/bot.d.ts +1 -3
  2. package/dist/device/bot.d.ts.map +1 -1
  3. package/dist/device/bot.js +4 -6
  4. package/dist/device/bot.js.map +1 -1
  5. package/dist/device/ceilinglight.d.ts +1 -3
  6. package/dist/device/ceilinglight.d.ts.map +1 -1
  7. package/dist/device/ceilinglight.js +4 -6
  8. package/dist/device/ceilinglight.js.map +1 -1
  9. package/dist/device/colorbulb.d.ts +1 -3
  10. package/dist/device/colorbulb.d.ts.map +1 -1
  11. package/dist/device/colorbulb.js +4 -6
  12. package/dist/device/colorbulb.js.map +1 -1
  13. package/dist/device/contact.d.ts +1 -3
  14. package/dist/device/contact.d.ts.map +1 -1
  15. package/dist/device/contact.js +4 -6
  16. package/dist/device/contact.js.map +1 -1
  17. package/dist/device/curtain.d.ts +1 -0
  18. package/dist/device/curtain.d.ts.map +1 -1
  19. package/dist/device/curtain.js +12 -16
  20. package/dist/device/curtain.js.map +1 -1
  21. package/dist/device/humidifier.d.ts +1 -3
  22. package/dist/device/humidifier.d.ts.map +1 -1
  23. package/dist/device/humidifier.js +4 -6
  24. package/dist/device/humidifier.js.map +1 -1
  25. package/dist/device/lock.d.ts +1 -3
  26. package/dist/device/lock.d.ts.map +1 -1
  27. package/dist/device/lock.js +4 -6
  28. package/dist/device/lock.js.map +1 -1
  29. package/dist/device/meter.d.ts +1 -3
  30. package/dist/device/meter.d.ts.map +1 -1
  31. package/dist/device/meter.js +4 -6
  32. package/dist/device/meter.js.map +1 -1
  33. package/dist/device/meterplus.d.ts +1 -3
  34. package/dist/device/meterplus.d.ts.map +1 -1
  35. package/dist/device/meterplus.js +4 -6
  36. package/dist/device/meterplus.js.map +1 -1
  37. package/dist/device/motion.d.ts +1 -0
  38. package/dist/device/motion.d.ts.map +1 -1
  39. package/dist/device/motion.js +12 -16
  40. package/dist/device/motion.js.map +1 -1
  41. package/dist/device/plug.d.ts +1 -3
  42. package/dist/device/plug.d.ts.map +1 -1
  43. package/dist/device/plug.js +4 -6
  44. package/dist/device/plug.js.map +1 -1
  45. package/dist/device/striplight.d.ts +1 -3
  46. package/dist/device/striplight.d.ts.map +1 -1
  47. package/dist/device/striplight.js +4 -6
  48. package/dist/device/striplight.js.map +1 -1
  49. package/package.json +1 -1
  50. package/src/device/bot.ts +4 -6
  51. package/src/device/ceilinglight.ts +4 -6
  52. package/src/device/colorbulb.ts +4 -6
  53. package/src/device/contact.ts +4 -6
  54. package/src/device/curtain.ts +12 -14
  55. package/src/device/humidifier.ts +4 -6
  56. package/src/device/lock.ts +4 -6
  57. package/src/device/meter.ts +4 -6
  58. package/src/device/meterplus.ts +4 -6
  59. package/src/device/motion.ts +12 -14
  60. package/src/device/plug.ts +4 -6
  61. package/src/device/striplight.ts +4 -6
@@ -335,7 +335,7 @@ export class StripLight {
335
335
  if (this.serviceData) {
336
336
  this.connected = true;
337
337
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} connected: ${this.connected}`);
338
- await this.stopScanning({ switchbot: { switchbot } });
338
+ await this.stopScanning(switchbot);
339
339
  } else {
340
340
  this.connected = false;
341
341
  this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} connected: ${this.connected}`);
@@ -346,7 +346,7 @@ export class StripLight {
346
346
  })
347
347
  .then(async () => {
348
348
  // Stop to monitor
349
- await this.stopScanning({ switchbot: { switchbot } });
349
+ await this.stopScanning(switchbot);
350
350
  })
351
351
  .catch(async (e: any) => {
352
352
  this.apiError(e);
@@ -830,10 +830,8 @@ export class StripLight {
830
830
  }
831
831
  }
832
832
 
833
- async stopScanning({ switchbot }: { switchbot: any; }): Promise<void> {
834
- if (switchbot) {
835
- await switchbot.stopScan();
836
- }
833
+ async stopScanning(switchbot: any) {
834
+ await switchbot.stopScan();
837
835
  if (this.connected) {
838
836
  await this.BLEparseStatus();
839
837
  await this.updateHomeKitCharacteristics();