@switchbot/homebridge-switchbot 2.2.2-beta.15 → 2.2.2-beta.16

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 (49) hide show
  1. package/dist/device/bot.d.ts.map +1 -1
  2. package/dist/device/bot.js +3 -1
  3. package/dist/device/bot.js.map +1 -1
  4. package/dist/device/ceilinglight.d.ts.map +1 -1
  5. package/dist/device/ceilinglight.js +3 -1
  6. package/dist/device/ceilinglight.js.map +1 -1
  7. package/dist/device/colorbulb.d.ts.map +1 -1
  8. package/dist/device/colorbulb.js +3 -1
  9. package/dist/device/colorbulb.js.map +1 -1
  10. package/dist/device/contact.d.ts.map +1 -1
  11. package/dist/device/contact.js +3 -1
  12. package/dist/device/contact.js.map +1 -1
  13. package/dist/device/curtain.d.ts.map +1 -1
  14. package/dist/device/curtain.js +3 -1
  15. package/dist/device/curtain.js.map +1 -1
  16. package/dist/device/humidifier.d.ts.map +1 -1
  17. package/dist/device/humidifier.js +3 -1
  18. package/dist/device/humidifier.js.map +1 -1
  19. package/dist/device/lock.d.ts.map +1 -1
  20. package/dist/device/lock.js +3 -1
  21. package/dist/device/lock.js.map +1 -1
  22. package/dist/device/meter.d.ts.map +1 -1
  23. package/dist/device/meter.js +3 -1
  24. package/dist/device/meter.js.map +1 -1
  25. package/dist/device/meterplus.d.ts.map +1 -1
  26. package/dist/device/meterplus.js +3 -1
  27. package/dist/device/meterplus.js.map +1 -1
  28. package/dist/device/motion.d.ts.map +1 -1
  29. package/dist/device/motion.js +3 -1
  30. package/dist/device/motion.js.map +1 -1
  31. package/dist/device/plug.d.ts.map +1 -1
  32. package/dist/device/plug.js +3 -1
  33. package/dist/device/plug.js.map +1 -1
  34. package/dist/device/striplight.d.ts.map +1 -1
  35. package/dist/device/striplight.js +3 -1
  36. package/dist/device/striplight.js.map +1 -1
  37. package/package.json +1 -1
  38. package/src/device/bot.ts +3 -1
  39. package/src/device/ceilinglight.ts +3 -1
  40. package/src/device/colorbulb.ts +3 -1
  41. package/src/device/contact.ts +3 -1
  42. package/src/device/curtain.ts +3 -1
  43. package/src/device/humidifier.ts +3 -1
  44. package/src/device/lock.ts +3 -1
  45. package/src/device/meter.ts +3 -1
  46. package/src/device/meterplus.ts +3 -1
  47. package/src/device/motion.ts +3 -1
  48. package/src/device/plug.ts +3 -1
  49. package/src/device/striplight.ts +3 -1
@@ -491,7 +491,9 @@ export class Lock {
491
491
  }
492
492
 
493
493
  async stopScanning({ switchbot }: { switchbot: any; }): Promise<void> {
494
- await switchbot.stopScan();
494
+ if (switchbot) {
495
+ await switchbot.stopScan();
496
+ }
495
497
  if (this.connected) {
496
498
  await this.BLEparseStatus();
497
499
  await this.updateHomeKitCharacteristics();
@@ -489,7 +489,9 @@ export class Meter {
489
489
  }
490
490
 
491
491
  async stopScanning({ switchbot }: { switchbot: any; }): Promise<void> {
492
- await switchbot.stopScan();
492
+ if (switchbot) {
493
+ await switchbot.stopScan();
494
+ }
493
495
  if (this.connected) {
494
496
  await this.BLEparseStatus();
495
497
  await this.updateHomeKitCharacteristics();
@@ -488,7 +488,9 @@ export class MeterPlus {
488
488
  }
489
489
 
490
490
  async stopScanning({ switchbot }: { switchbot: any; }): Promise<void> {
491
- await switchbot.stopScan();
491
+ if (switchbot) {
492
+ await switchbot.stopScan();
493
+ }
492
494
  if (this.connected) {
493
495
  await this.BLEparseStatus();
494
496
  await this.updateHomeKitCharacteristics();
@@ -395,7 +395,9 @@ export class Motion {
395
395
  }
396
396
 
397
397
  async stopScanning({ switchbot }: { switchbot: any; }): Promise<void> {
398
- await await switchbot.stopScan();
398
+ if (switchbot) {
399
+ await switchbot.stopScan();
400
+ }
399
401
  if (this.connected) {
400
402
  await this.BLEparseStatus();
401
403
  await this.updateHomeKitCharacteristics();
@@ -459,7 +459,9 @@ export class Plug {
459
459
  }
460
460
 
461
461
  async stopScanning({ switchbot }: { switchbot: any; }): Promise<void> {
462
- await switchbot.stopScan();
462
+ if (switchbot) {
463
+ await switchbot.stopScan();
464
+ }
463
465
  if (this.connected) {
464
466
  await this.BLEparseStatus();
465
467
  await this.updateHomeKitCharacteristics();
@@ -831,7 +831,9 @@ export class StripLight {
831
831
  }
832
832
 
833
833
  async stopScanning({ switchbot }: { switchbot: any; }): Promise<void> {
834
- await switchbot.stopScan();
834
+ if (switchbot) {
835
+ await switchbot.stopScan();
836
+ }
835
837
  if (this.connected) {
836
838
  await this.BLEparseStatus();
837
839
  await this.updateHomeKitCharacteristics();