@switchbot/homebridge-switchbot 1.12.9-beta.9 → 1.13.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.
- package/.github/workflows/codeql-analysis.yml +3 -3
- package/.github/workflows/dependabot.yml +17 -0
- package/.github/workflows/nodejs-beta.yml +0 -3
- package/.github/workflows/nodejs.yml +0 -3
- package/CHANGELOG.md +3 -1
- package/config.schema.json +1 -1
- package/dist/device/bot.d.ts +3 -0
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +18 -2
- package/dist/device/bot.js.map +1 -1
- package/dist/device/colorbulb.d.ts +3 -0
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +18 -2
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts +3 -0
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +18 -2
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts +6 -0
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +57 -2
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/humidifier.d.ts +3 -0
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +18 -2
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/lock.d.ts +3 -0
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +18 -2
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts +9 -0
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +82 -7
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts +3 -0
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +18 -2
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts +3 -0
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +18 -2
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts +3 -0
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +18 -2
- package/dist/device/plug.js.map +1 -1
- package/dist/device/striplight.d.ts +3 -0
- package/dist/device/striplight.d.ts.map +1 -1
- package/dist/device/striplight.js +18 -2
- package/dist/device/striplight.js.map +1 -1
- package/dist/irdevice/other.js +3 -3
- package/dist/irdevice/other.js.map +1 -1
- package/dist/platform.d.ts +1 -0
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +43 -40
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +5 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js.map +1 -1
- package/package.json +78 -76
- package/src/device/bot.ts +18 -2
- package/src/device/colorbulb.ts +18 -2
- package/src/device/contact.ts +18 -2
- package/src/device/curtain.ts +60 -2
- package/src/device/humidifier.ts +18 -2
- package/src/device/lock.ts +18 -2
- package/src/device/meter.ts +90 -7
- package/src/device/meterplus.ts +18 -2
- package/src/device/motion.ts +18 -2
- package/src/device/plug.ts +18 -2
- package/src/device/striplight.ts +18 -2
- package/src/irdevice/other.ts +3 -3
- package/src/platform.ts +46 -40
- package/src/settings.ts +5 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"other.js","sourceRoot":"","sources":["../../src/irdevice/other.ts"],"names":[],"mappings":";;;AAEA,0CAA4E;AAG5E;;;;GAIG;AACH,MAAa,MAAM;IAYjB,YAA6B,QAA2B,EAAU,SAA4B,EAAS,MAAkC;QAA5G,aAAQ,GAAR,QAAQ,CAAmB;QAAU,cAAS,GAAT,SAAS,CAAmB;QAAS,WAAM,GAAN,MAAM,CAA4B;QACvI,uBAAuB;QACvB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAClB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACxB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACpB,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE;YAC7B,IAAI,CAAC,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AI,IAAI,CAAC,aAAa,KAAK,OAAO,EAAE;gBAClC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;aACnD;iBAAM;gBACL,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;aACzC;SACF;IACH,CAAC;IAED,qBAAqB;QACnB,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,aAAa,KAAK,UAAU,CAAC;IACnF,CAAC;CACF;AAvQD,wBAuQC"}
|
package/dist/platform.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
19
19
|
registeringDevice: boolean;
|
|
20
20
|
debugMode: boolean;
|
|
21
21
|
platformLogging?: string;
|
|
22
|
+
readonly fakegatoAPI: any;
|
|
22
23
|
constructor(log: Logger, config: SwitchBotPlatformConfig, api: API);
|
|
23
24
|
logs(): void;
|
|
24
25
|
/**
|
package/dist/platform.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAoBA,OAAc,EAAE,aAAa,EAAsB,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5G,OAAO,EAAyC,QAAQ,EAAE,MAAM,EAAE,uBAAuB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAoBA,OAAc,EAAE,aAAa,EAAsB,MAAM,OAAO,CAAC;AACjE,OA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,WAAW;YAuDX,oBAAoB;YAuDpB,iBAAiB;YAuDjB,iBAAiB;YAuDjB,mBAAmB;YAuDnB,YAAY;YAuDZ,YAAY;IAuDb,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,EAAE,SAAS,EAAE,iBAAiB;IAQvF,+BAA+B,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,EAAE,iBAAiB,EAAE,iBAAiB;IAQpG,4BAA4B,CAAC,SAAS,EAAE,iBAAiB;IAIzD,iCAAiC,CAAC,iBAAiB,EAAE,iBAAiB;IAI5E,6BAA6B,CAAC,iBAAiB,EAAE,iBAAiB;IAMlE,cAAc,CAAC,OAAO,EAAE,eAAe;IAMjC,UAAU,CAAC,MAAM,EAAE,CAAC,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,MAAM,GAAG,aAAa,CAAC;IAcrF,UAAU;IAaV;;;OAGG;IACH,OAAO,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;IAM5B,OAAO,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;IAM5B,QAAQ,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;IAM7B,QAAQ,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;IAU7B,uBAAuB,IAAI,OAAO;CAGnC"}
|
package/dist/platform.js
CHANGED
|
@@ -26,6 +26,7 @@ const vacuumcleaner_1 = require("./irdevice/vacuumcleaner");
|
|
|
26
26
|
const airconditioner_1 = require("./irdevice/airconditioner");
|
|
27
27
|
const axios_1 = __importDefault(require("axios"));
|
|
28
28
|
const settings_1 = require("./settings");
|
|
29
|
+
const fakegato_history_1 = __importDefault(require("fakegato-history"));
|
|
29
30
|
/**
|
|
30
31
|
* HomebridgePlatform
|
|
31
32
|
* This class is the main constructor for your plugin, this is where you should
|
|
@@ -72,6 +73,8 @@ class SwitchBotPlatform {
|
|
|
72
73
|
request.headers['Content-Type'] = 'application/json; charset=utf8';
|
|
73
74
|
return request;
|
|
74
75
|
});
|
|
76
|
+
// import fakegato-history module
|
|
77
|
+
this.fakegatoAPI = (0, fakegato_history_1.default)(api);
|
|
75
78
|
// When this event is fired it means Homebridge has restored all cached accessories from disk.
|
|
76
79
|
// Dynamic Platform plugins should only register new accessories after this event was fired,
|
|
77
80
|
// in order to ensure they weren't added to homebridge already. This event can also be used
|
|
@@ -509,7 +512,7 @@ class SwitchBotPlatform {
|
|
|
509
512
|
existingAccessory.context.model = device.deviceType;
|
|
510
513
|
existingAccessory.context.deviceID = device.deviceId;
|
|
511
514
|
existingAccessory.displayName = device.deviceName;
|
|
512
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
515
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
513
516
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
514
517
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
515
518
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -532,7 +535,7 @@ class SwitchBotPlatform {
|
|
|
532
535
|
accessory.context.device = device;
|
|
533
536
|
accessory.context.model = device.deviceType;
|
|
534
537
|
accessory.context.deviceID = device.deviceId;
|
|
535
|
-
accessory.context.firmwareRevision = device.firmware
|
|
538
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
536
539
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
537
540
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
538
541
|
// create the accessory handler for the newly create accessory
|
|
@@ -561,7 +564,7 @@ class SwitchBotPlatform {
|
|
|
561
564
|
existingAccessory.context.model = device.deviceType;
|
|
562
565
|
existingAccessory.context.deviceID = device.deviceId;
|
|
563
566
|
existingAccessory.displayName = device.deviceName;
|
|
564
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
567
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
565
568
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
566
569
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
567
570
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -585,7 +588,7 @@ class SwitchBotPlatform {
|
|
|
585
588
|
accessory.context.device = device;
|
|
586
589
|
accessory.context.model = device.deviceType;
|
|
587
590
|
accessory.context.deviceID = device.deviceId;
|
|
588
|
-
accessory.context.firmwareRevision = device.firmware
|
|
591
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
589
592
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
590
593
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
591
594
|
// accessory.context.firmwareRevision = findaccessories.accessoryAttribute.softwareRevision;
|
|
@@ -614,7 +617,7 @@ class SwitchBotPlatform {
|
|
|
614
617
|
existingAccessory.context.model = device.deviceType;
|
|
615
618
|
existingAccessory.context.deviceID = device.deviceId;
|
|
616
619
|
existingAccessory.displayName = device.deviceName;
|
|
617
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
620
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
618
621
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
619
622
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
620
623
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -637,7 +640,7 @@ class SwitchBotPlatform {
|
|
|
637
640
|
accessory.context.device = device;
|
|
638
641
|
accessory.context.model = device.deviceType;
|
|
639
642
|
accessory.context.deviceID = device.deviceId;
|
|
640
|
-
accessory.context.firmwareRevision = device.firmware
|
|
643
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
641
644
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
642
645
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
643
646
|
// create the accessory handler for the newly create accessory
|
|
@@ -665,7 +668,7 @@ class SwitchBotPlatform {
|
|
|
665
668
|
existingAccessory.context.model = device.deviceType;
|
|
666
669
|
existingAccessory.context.deviceID = device.deviceId;
|
|
667
670
|
existingAccessory.displayName = device.deviceName;
|
|
668
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
671
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
669
672
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
670
673
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
671
674
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -688,7 +691,7 @@ class SwitchBotPlatform {
|
|
|
688
691
|
accessory.context.device = device;
|
|
689
692
|
accessory.context.model = device.deviceType;
|
|
690
693
|
accessory.context.deviceID = device.deviceId;
|
|
691
|
-
accessory.context.firmwareRevision = device.firmware
|
|
694
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
692
695
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
693
696
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
694
697
|
// create the accessory handler for the newly create accessory
|
|
@@ -716,7 +719,7 @@ class SwitchBotPlatform {
|
|
|
716
719
|
existingAccessory.context.model = device.deviceType;
|
|
717
720
|
existingAccessory.context.deviceID = device.deviceId;
|
|
718
721
|
existingAccessory.displayName = device.deviceName;
|
|
719
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
722
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
720
723
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
721
724
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
722
725
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -739,7 +742,7 @@ class SwitchBotPlatform {
|
|
|
739
742
|
accessory.context.device = device;
|
|
740
743
|
accessory.context.model = device.deviceType;
|
|
741
744
|
accessory.context.deviceID = device.deviceId;
|
|
742
|
-
accessory.context.firmwareRevision = device.firmware
|
|
745
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
743
746
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
744
747
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
745
748
|
// create the accessory handler for the newly create accessory
|
|
@@ -767,7 +770,7 @@ class SwitchBotPlatform {
|
|
|
767
770
|
existingAccessory.context.model = device.deviceType;
|
|
768
771
|
existingAccessory.context.deviceID = device.deviceId;
|
|
769
772
|
existingAccessory.displayName = device.deviceName;
|
|
770
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
773
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
771
774
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
772
775
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
773
776
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -790,7 +793,7 @@ class SwitchBotPlatform {
|
|
|
790
793
|
accessory.context.device = device;
|
|
791
794
|
accessory.context.model = device.deviceType;
|
|
792
795
|
accessory.context.deviceID = device.deviceId;
|
|
793
|
-
accessory.context.firmwareRevision = device.firmware
|
|
796
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
794
797
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
795
798
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
796
799
|
// create the accessory handler for the newly create accessory
|
|
@@ -818,7 +821,7 @@ class SwitchBotPlatform {
|
|
|
818
821
|
existingAccessory.context.model = device.deviceType;
|
|
819
822
|
existingAccessory.context.deviceID = device.deviceId;
|
|
820
823
|
existingAccessory.displayName = device.deviceName;
|
|
821
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
824
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
822
825
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
823
826
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
824
827
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -853,7 +856,7 @@ class SwitchBotPlatform {
|
|
|
853
856
|
accessory.context.device = device;
|
|
854
857
|
accessory.context.model = device.deviceType;
|
|
855
858
|
accessory.context.deviceID = device.deviceId;
|
|
856
|
-
accessory.context.firmwareRevision = device.firmware
|
|
859
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
857
860
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
858
861
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
859
862
|
// create the accessory handler for the newly create accessory
|
|
@@ -893,7 +896,7 @@ class SwitchBotPlatform {
|
|
|
893
896
|
existingAccessory.context.model = device.deviceType;
|
|
894
897
|
existingAccessory.context.deviceID = device.deviceId;
|
|
895
898
|
existingAccessory.displayName = device.deviceName;
|
|
896
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
899
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
897
900
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
898
901
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
899
902
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -916,7 +919,7 @@ class SwitchBotPlatform {
|
|
|
916
919
|
accessory.context.device = device;
|
|
917
920
|
accessory.context.model = device.deviceType;
|
|
918
921
|
accessory.context.deviceID = device.deviceId;
|
|
919
|
-
accessory.context.firmwareRevision = device.firmware
|
|
922
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
920
923
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
921
924
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
922
925
|
// create the accessory handler for the newly create accessory
|
|
@@ -944,7 +947,7 @@ class SwitchBotPlatform {
|
|
|
944
947
|
existingAccessory.context.model = device.deviceType;
|
|
945
948
|
existingAccessory.context.deviceID = device.deviceId;
|
|
946
949
|
existingAccessory.displayName = device.deviceName;
|
|
947
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
950
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
948
951
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
949
952
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
950
953
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -967,7 +970,7 @@ class SwitchBotPlatform {
|
|
|
967
970
|
accessory.context.device = device;
|
|
968
971
|
accessory.context.model = device.deviceType;
|
|
969
972
|
accessory.context.deviceID = device.deviceId;
|
|
970
|
-
accessory.context.firmwareRevision = device.firmware
|
|
973
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
971
974
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
972
975
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
973
976
|
// create the accessory handler for the newly create accessory
|
|
@@ -995,7 +998,7 @@ class SwitchBotPlatform {
|
|
|
995
998
|
existingAccessory.context.model = device.deviceType;
|
|
996
999
|
existingAccessory.context.deviceID = device.deviceId;
|
|
997
1000
|
existingAccessory.displayName = device.deviceName;
|
|
998
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1001
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
999
1002
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1000
1003
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
1001
1004
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1018,7 +1021,7 @@ class SwitchBotPlatform {
|
|
|
1018
1021
|
accessory.context.device = device;
|
|
1019
1022
|
accessory.context.model = device.deviceType;
|
|
1020
1023
|
accessory.context.deviceID = device.deviceId;
|
|
1021
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1024
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1022
1025
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1023
1026
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
1024
1027
|
// create the accessory handler for the newly create accessory
|
|
@@ -1046,7 +1049,7 @@ class SwitchBotPlatform {
|
|
|
1046
1049
|
existingAccessory.context.model = device.deviceType;
|
|
1047
1050
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1048
1051
|
existingAccessory.displayName = device.deviceName;
|
|
1049
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1052
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1050
1053
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1051
1054
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
1052
1055
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1069,7 +1072,7 @@ class SwitchBotPlatform {
|
|
|
1069
1072
|
accessory.context.device = device;
|
|
1070
1073
|
accessory.context.model = device.deviceType;
|
|
1071
1074
|
accessory.context.deviceID = device.deviceId;
|
|
1072
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1075
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1073
1076
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1074
1077
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
1075
1078
|
// create the accessory handler for the newly create accessory
|
|
@@ -1095,7 +1098,7 @@ class SwitchBotPlatform {
|
|
|
1095
1098
|
existingAccessory.context.model = device.remoteType;
|
|
1096
1099
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1097
1100
|
existingAccessory.displayName = device.deviceName;
|
|
1098
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1101
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1099
1102
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1100
1103
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1101
1104
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1114,7 +1117,7 @@ class SwitchBotPlatform {
|
|
|
1114
1117
|
accessory.context.device = device;
|
|
1115
1118
|
accessory.context.model = device.remoteType;
|
|
1116
1119
|
accessory.context.deviceID = device.deviceId;
|
|
1117
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1120
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1118
1121
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1119
1122
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1120
1123
|
// create the accessory handler for the newly create accessory
|
|
@@ -1146,7 +1149,7 @@ class SwitchBotPlatform {
|
|
|
1146
1149
|
existingAccessory.context.model = device.remoteType;
|
|
1147
1150
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1148
1151
|
existingAccessory.displayName = device.deviceName;
|
|
1149
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1152
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1150
1153
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1151
1154
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1152
1155
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1169,7 +1172,7 @@ class SwitchBotPlatform {
|
|
|
1169
1172
|
accessory.context.device = device;
|
|
1170
1173
|
accessory.context.model = device.remoteType;
|
|
1171
1174
|
accessory.context.deviceID = device.deviceId;
|
|
1172
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1175
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1173
1176
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1174
1177
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1175
1178
|
// create the accessory handler for the newly create accessory
|
|
@@ -1197,7 +1200,7 @@ class SwitchBotPlatform {
|
|
|
1197
1200
|
existingAccessory.context.model = device.remoteType;
|
|
1198
1201
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1199
1202
|
existingAccessory.displayName = device.deviceName;
|
|
1200
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1203
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1201
1204
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1202
1205
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1203
1206
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1220,7 +1223,7 @@ class SwitchBotPlatform {
|
|
|
1220
1223
|
accessory.context.device = device;
|
|
1221
1224
|
accessory.context.model = device.remoteType;
|
|
1222
1225
|
accessory.context.deviceID = device.deviceId;
|
|
1223
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1226
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1224
1227
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1225
1228
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1226
1229
|
// create the accessory handler for the newly create accessory
|
|
@@ -1248,7 +1251,7 @@ class SwitchBotPlatform {
|
|
|
1248
1251
|
existingAccessory.context.model = device.remoteType;
|
|
1249
1252
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1250
1253
|
existingAccessory.displayName = device.deviceName;
|
|
1251
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1254
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1252
1255
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1253
1256
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1254
1257
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1271,7 +1274,7 @@ class SwitchBotPlatform {
|
|
|
1271
1274
|
accessory.context.device = device;
|
|
1272
1275
|
accessory.context.model = device.remoteType;
|
|
1273
1276
|
accessory.context.deviceID = device.deviceId;
|
|
1274
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1277
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1275
1278
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1276
1279
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1277
1280
|
// create the accessory handler for the newly create accessory
|
|
@@ -1299,7 +1302,7 @@ class SwitchBotPlatform {
|
|
|
1299
1302
|
existingAccessory.context.model = device.remoteType;
|
|
1300
1303
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1301
1304
|
existingAccessory.displayName = device.deviceName;
|
|
1302
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1305
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1303
1306
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1304
1307
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1305
1308
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1322,7 +1325,7 @@ class SwitchBotPlatform {
|
|
|
1322
1325
|
accessory.context.device = device;
|
|
1323
1326
|
accessory.context.model = device.remoteType;
|
|
1324
1327
|
accessory.context.deviceID = device.deviceId;
|
|
1325
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1328
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1326
1329
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1327
1330
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1328
1331
|
// create the accessory handler for the newly create accessory
|
|
@@ -1350,7 +1353,7 @@ class SwitchBotPlatform {
|
|
|
1350
1353
|
existingAccessory.context.model = device.remoteType;
|
|
1351
1354
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1352
1355
|
existingAccessory.displayName = device.deviceName;
|
|
1353
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1356
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1354
1357
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1355
1358
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1356
1359
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1373,7 +1376,7 @@ class SwitchBotPlatform {
|
|
|
1373
1376
|
accessory.context.device = device;
|
|
1374
1377
|
accessory.context.model = device.remoteType;
|
|
1375
1378
|
accessory.context.deviceID = device.deviceId;
|
|
1376
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1379
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1377
1380
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1378
1381
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1379
1382
|
// create the accessory handler for the newly create accessory
|
|
@@ -1401,7 +1404,7 @@ class SwitchBotPlatform {
|
|
|
1401
1404
|
existingAccessory.context.model = device.remoteType;
|
|
1402
1405
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1403
1406
|
existingAccessory.displayName = device.deviceName;
|
|
1404
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1407
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1405
1408
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1406
1409
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1407
1410
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1424,7 +1427,7 @@ class SwitchBotPlatform {
|
|
|
1424
1427
|
accessory.context.device = device;
|
|
1425
1428
|
accessory.context.model = device.remoteType;
|
|
1426
1429
|
accessory.context.deviceID = device.deviceId;
|
|
1427
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1430
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1428
1431
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1429
1432
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1430
1433
|
// create the accessory handler for the newly create accessory
|
|
@@ -1452,7 +1455,7 @@ class SwitchBotPlatform {
|
|
|
1452
1455
|
existingAccessory.context.model = device.remoteType;
|
|
1453
1456
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1454
1457
|
existingAccessory.displayName = device.deviceName;
|
|
1455
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1458
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1456
1459
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1457
1460
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1458
1461
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1475,7 +1478,7 @@ class SwitchBotPlatform {
|
|
|
1475
1478
|
accessory.context.device = device;
|
|
1476
1479
|
accessory.context.model = device.remoteType;
|
|
1477
1480
|
accessory.context.deviceID = device.deviceId;
|
|
1478
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1481
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1479
1482
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1480
1483
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1481
1484
|
// create the accessory handler for the newly create accessory
|
|
@@ -1503,7 +1506,7 @@ class SwitchBotPlatform {
|
|
|
1503
1506
|
existingAccessory.context.model = device.remoteType;
|
|
1504
1507
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1505
1508
|
existingAccessory.displayName = device.deviceName;
|
|
1506
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1509
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1507
1510
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1508
1511
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1509
1512
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1526,7 +1529,7 @@ class SwitchBotPlatform {
|
|
|
1526
1529
|
accessory.context.device = device;
|
|
1527
1530
|
accessory.context.model = device.remoteType;
|
|
1528
1531
|
accessory.context.deviceID = device.deviceId;
|
|
1529
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1532
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1530
1533
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1531
1534
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1532
1535
|
// create the accessory handler for the newly create accessory
|