@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.
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +3 -0
- package/dist/device/bot.js.map +1 -1
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +3 -0
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +3 -0
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +3 -0
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +3 -0
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +3 -0
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +3 -0
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +3 -0
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +3 -0
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +3 -0
- package/dist/device/plug.js.map +1 -1
- package/dist/device/striplight.d.ts.map +1 -1
- package/dist/device/striplight.js +3 -0
- package/dist/device/striplight.js.map +1 -1
- package/dist/irdevice/airconditioner.d.ts.map +1 -1
- package/dist/irdevice/airconditioner.js +3 -0
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/irdevice/airpurifier.d.ts.map +1 -1
- package/dist/irdevice/airpurifier.js +3 -0
- package/dist/irdevice/airpurifier.js.map +1 -1
- package/dist/irdevice/camera.d.ts.map +1 -1
- package/dist/irdevice/camera.js +3 -0
- package/dist/irdevice/camera.js.map +1 -1
- package/dist/irdevice/fan.d.ts.map +1 -1
- package/dist/irdevice/fan.js +3 -0
- package/dist/irdevice/fan.js.map +1 -1
- package/dist/irdevice/light.d.ts.map +1 -1
- package/dist/irdevice/light.js +3 -0
- package/dist/irdevice/light.js.map +1 -1
- package/dist/irdevice/other.d.ts.map +1 -1
- package/dist/irdevice/other.js +3 -0
- package/dist/irdevice/other.js.map +1 -1
- package/dist/irdevice/tv.d.ts.map +1 -1
- package/dist/irdevice/tv.js +3 -0
- package/dist/irdevice/tv.js.map +1 -1
- package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
- package/dist/irdevice/vacuumcleaner.js +3 -0
- package/dist/irdevice/vacuumcleaner.js.map +1 -1
- package/dist/irdevice/waterheater.d.ts.map +1 -1
- package/dist/irdevice/waterheater.js +3 -0
- package/dist/irdevice/waterheater.js.map +1 -1
- package/dist/platform.js +2 -2
- package/dist/platform.js.map +1 -1
- package/package.json +1 -1
- package/src/device/bot.ts +3 -0
- package/src/device/colorbulb.ts +3 -0
- package/src/device/contact.ts +3 -0
- package/src/device/curtain.ts +3 -0
- package/src/device/humidifier.ts +3 -0
- package/src/device/lock.ts +3 -0
- package/src/device/meter.ts +3 -0
- package/src/device/meterplus.ts +3 -0
- package/src/device/motion.ts +3 -0
- package/src/device/plug.ts +3 -0
- package/src/device/striplight.ts +3 -0
- package/src/irdevice/airconditioner.ts +4 -1
- package/src/irdevice/airpurifier.ts +3 -0
- package/src/irdevice/camera.ts +3 -0
- package/src/irdevice/fan.ts +3 -0
- package/src/irdevice/light.ts +3 -0
- package/src/irdevice/other.ts +3 -0
- package/src/irdevice/tv.ts +3 -0
- package/src/irdevice/vacuumcleaner.ts +3 -0
- package/src/irdevice/waterheater.ts +3 -0
- package/src/platform.ts +2 -2
package/src/device/striplight.ts
CHANGED
|
@@ -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
|
}
|
package/src/irdevice/camera.ts
CHANGED
|
@@ -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
|
}
|
package/src/irdevice/fan.ts
CHANGED
|
@@ -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
|
}
|
package/src/irdevice/light.ts
CHANGED
|
@@ -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
|
}
|
package/src/irdevice/other.ts
CHANGED
|
@@ -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
|
}
|
package/src/irdevice/tv.ts
CHANGED
|
@@ -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.
|
|
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
|
}
|