@switchbot/homebridge-switchbot 2.0.0-beta.33 → 2.0.0-beta.34

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 (84) hide show
  1. package/dist/device/bot.d.ts.map +1 -1
  2. package/dist/device/bot.js +3 -0
  3. package/dist/device/bot.js.map +1 -1
  4. package/dist/device/colorbulb.d.ts.map +1 -1
  5. package/dist/device/colorbulb.js +3 -0
  6. package/dist/device/colorbulb.js.map +1 -1
  7. package/dist/device/contact.d.ts.map +1 -1
  8. package/dist/device/contact.js +3 -0
  9. package/dist/device/contact.js.map +1 -1
  10. package/dist/device/curtain.d.ts.map +1 -1
  11. package/dist/device/curtain.js +3 -0
  12. package/dist/device/curtain.js.map +1 -1
  13. package/dist/device/humidifier.d.ts.map +1 -1
  14. package/dist/device/humidifier.js +3 -0
  15. package/dist/device/humidifier.js.map +1 -1
  16. package/dist/device/lock.d.ts.map +1 -1
  17. package/dist/device/lock.js +3 -0
  18. package/dist/device/lock.js.map +1 -1
  19. package/dist/device/meter.d.ts.map +1 -1
  20. package/dist/device/meter.js +3 -0
  21. package/dist/device/meter.js.map +1 -1
  22. package/dist/device/meterplus.d.ts.map +1 -1
  23. package/dist/device/meterplus.js +3 -0
  24. package/dist/device/meterplus.js.map +1 -1
  25. package/dist/device/motion.d.ts.map +1 -1
  26. package/dist/device/motion.js +3 -0
  27. package/dist/device/motion.js.map +1 -1
  28. package/dist/device/plug.d.ts.map +1 -1
  29. package/dist/device/plug.js +3 -0
  30. package/dist/device/plug.js.map +1 -1
  31. package/dist/device/striplight.d.ts.map +1 -1
  32. package/dist/device/striplight.js +3 -0
  33. package/dist/device/striplight.js.map +1 -1
  34. package/dist/irdevice/airconditioner.d.ts.map +1 -1
  35. package/dist/irdevice/airconditioner.js +3 -0
  36. package/dist/irdevice/airconditioner.js.map +1 -1
  37. package/dist/irdevice/airpurifier.d.ts.map +1 -1
  38. package/dist/irdevice/airpurifier.js +3 -0
  39. package/dist/irdevice/airpurifier.js.map +1 -1
  40. package/dist/irdevice/camera.d.ts.map +1 -1
  41. package/dist/irdevice/camera.js +3 -0
  42. package/dist/irdevice/camera.js.map +1 -1
  43. package/dist/irdevice/fan.d.ts.map +1 -1
  44. package/dist/irdevice/fan.js +3 -0
  45. package/dist/irdevice/fan.js.map +1 -1
  46. package/dist/irdevice/light.d.ts.map +1 -1
  47. package/dist/irdevice/light.js +3 -0
  48. package/dist/irdevice/light.js.map +1 -1
  49. package/dist/irdevice/other.d.ts.map +1 -1
  50. package/dist/irdevice/other.js +3 -0
  51. package/dist/irdevice/other.js.map +1 -1
  52. package/dist/irdevice/tv.d.ts.map +1 -1
  53. package/dist/irdevice/tv.js +3 -0
  54. package/dist/irdevice/tv.js.map +1 -1
  55. package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
  56. package/dist/irdevice/vacuumcleaner.js +3 -0
  57. package/dist/irdevice/vacuumcleaner.js.map +1 -1
  58. package/dist/irdevice/waterheater.d.ts.map +1 -1
  59. package/dist/irdevice/waterheater.js +3 -0
  60. package/dist/irdevice/waterheater.js.map +1 -1
  61. package/dist/platform.js +2 -2
  62. package/dist/platform.js.map +1 -1
  63. package/package.json +1 -1
  64. package/src/device/bot.ts +3 -0
  65. package/src/device/colorbulb.ts +3 -0
  66. package/src/device/contact.ts +3 -0
  67. package/src/device/curtain.ts +3 -0
  68. package/src/device/humidifier.ts +3 -0
  69. package/src/device/lock.ts +3 -0
  70. package/src/device/meter.ts +3 -0
  71. package/src/device/meterplus.ts +3 -0
  72. package/src/device/motion.ts +3 -0
  73. package/src/device/plug.ts +3 -0
  74. package/src/device/striplight.ts +3 -0
  75. package/src/irdevice/airconditioner.ts +4 -1
  76. package/src/irdevice/airpurifier.ts +3 -0
  77. package/src/irdevice/camera.ts +3 -0
  78. package/src/irdevice/fan.ts +3 -0
  79. package/src/irdevice/light.ts +3 -0
  80. package/src/irdevice/other.ts +3 -0
  81. package/src/irdevice/tv.ts +3 -0
  82. package/src/irdevice/vacuumcleaner.ts +3 -0
  83. package/src/irdevice/waterheater.ts +3 -0
  84. package/src/platform.ts +2 -2
@@ -1028,6 +1028,9 @@ export class StripLight {
1028
1028
  if (device.connectionType !== undefined) {
1029
1029
  config['connectionType'] = device.connectionType;
1030
1030
  }
1031
+ if (device.external !== undefined) {
1032
+ config['external'] = device.external;
1033
+ }
1031
1034
  if (device.logging !== undefined) {
1032
1035
  config['logging'] = device.logging;
1033
1036
  }
@@ -641,6 +641,9 @@ export class AirConditioner {
641
641
  if (device.connectionType !== undefined) {
642
642
  config['connectionType'] = device.connectionType;
643
643
  }
644
+ if (device.external !== undefined) {
645
+ config['external'] = device.external;
646
+ }
644
647
  if (Object.entries(config).length !== 0) {
645
648
  this.infoLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${superStringify(config)}`);
646
649
  }
@@ -700,7 +703,7 @@ export class AirConditioner {
700
703
  }
701
704
  }
702
705
 
703
- debugErrorLog(...log: any[]): void {
706
+ debugErrorLog(...log: any[]): void {
704
707
  if (this.enablingDeviceLogging()) {
705
708
  if (this.deviceLogging?.includes('debug')) {
706
709
  this.platform.log.error('[DEBUG]', String(...log));
@@ -341,6 +341,9 @@ export class AirPurifier {
341
341
  if (device.connectionType !== undefined) {
342
342
  config['connectionType'] = device.connectionType;
343
343
  }
344
+ if (device.external !== undefined) {
345
+ config['external'] = device.external;
346
+ }
344
347
  if (Object.entries(config).length !== 0) {
345
348
  this.infoLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${superStringify(config)}`);
346
349
  }
@@ -230,6 +230,9 @@ export class Camera {
230
230
  if (device.connectionType !== undefined) {
231
231
  config['connectionType'] = device.connectionType;
232
232
  }
233
+ if (device.external !== undefined) {
234
+ config['external'] = device.external;
235
+ }
233
236
  if (Object.entries(config).length !== 0) {
234
237
  this.infoLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${superStringify(config)}`);
235
238
  }
@@ -362,6 +362,9 @@ export class Fan {
362
362
  if (device.connectionType !== undefined) {
363
363
  config['connectionType'] = device.connectionType;
364
364
  }
365
+ if (device.external !== undefined) {
366
+ config['external'] = device.external;
367
+ }
365
368
  if (Object.entries(config).length !== 0) {
366
369
  this.infoLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${superStringify(config)}`);
367
370
  }
@@ -249,6 +249,9 @@ export class Light {
249
249
  if (device.connectionType !== undefined) {
250
250
  config['connectionType'] = device.connectionType;
251
251
  }
252
+ if (device.external !== undefined) {
253
+ config['external'] = device.external;
254
+ }
252
255
  if (Object.entries(config).length !== 0) {
253
256
  this.infoLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${superStringify(config)}`);
254
257
  }
@@ -273,6 +273,9 @@ export class Others {
273
273
  if (device.connectionType !== undefined) {
274
274
  config['connectionType'] = device.connectionType;
275
275
  }
276
+ if (device.external !== undefined) {
277
+ config['external'] = device.external;
278
+ }
276
279
  if (Object.entries(config).length !== 0) {
277
280
  this.infoLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${superStringify(config)}`);
278
281
  }
@@ -464,6 +464,9 @@ export class TV {
464
464
  if (device.connectionType !== undefined) {
465
465
  config['connectionType'] = device.connectionType;
466
466
  }
467
+ if (device.external !== undefined) {
468
+ config['external'] = device.external;
469
+ }
467
470
  if (Object.entries(config).length !== 0) {
468
471
  this.infoLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${superStringify(config)}`);
469
472
  }
@@ -227,6 +227,9 @@ export class VacuumCleaner {
227
227
  if (device.connectionType !== undefined) {
228
228
  config['connectionType'] = device.connectionType;
229
229
  }
230
+ if (device.external !== undefined) {
231
+ config['external'] = device.external;
232
+ }
230
233
  if (Object.entries(config).length !== 0) {
231
234
  this.infoLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${superStringify(config)}`);
232
235
  }
@@ -230,6 +230,9 @@ export class WaterHeater {
230
230
  if (device.connectionType !== undefined) {
231
231
  config['connectionType'] = device.connectionType;
232
232
  }
233
+ if (device.external !== undefined) {
234
+ config['external'] = device.external;
235
+ }
233
236
  if (Object.entries(config).length !== 0) {
234
237
  this.infoLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${superStringify(config)}`);
235
238
  }
package/src/platform.ts CHANGED
@@ -1729,11 +1729,11 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
1729
1729
  }
1730
1730
 
1731
1731
  public async externalOrPlatform(device: device & devicesConfig, accessory: PlatformAccessory) {
1732
- this.debugLog(`${accessory.displayName} External Accessory Mode: ${device.external}`);
1733
1732
  if (device.external) {
1734
- this.warnLog(`${accessory.displayName} External Accessory Mode`);
1733
+ this.debugWarnLog(`${accessory.displayName} External Accessory Mode`);
1735
1734
  this.externalAccessory(accessory);
1736
1735
  } else {
1736
+ this.debugLog(`${accessory.displayName} External Accessory Mode: ${device.external}`);
1737
1737
  this.api.registerPlatformAccessories(PLUGIN_NAME, PLATFORM_NAME, [accessory]);
1738
1738
  }
1739
1739
  }