@switchbot/homebridge-switchbot 1.12.9-beta.10 → 1.12.9-beta.11
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 +4 -2
- package/dist/device/bot.js.map +1 -1
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +4 -2
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +4 -2
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +4 -2
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +4 -2
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +4 -2
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +4 -2
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +4 -2
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +4 -2
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +4 -2
- package/dist/device/plug.js.map +1 -1
- package/dist/device/striplight.d.ts.map +1 -1
- package/dist/device/striplight.js +4 -2
- package/dist/device/striplight.js.map +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +42 -41
- package/dist/platform.js.map +1 -1
- package/package.json +1 -1
- package/src/device/bot.ts +4 -2
- package/src/device/colorbulb.ts +4 -2
- package/src/device/contact.ts +4 -2
- package/src/device/curtain.ts +4 -2
- package/src/device/humidifier.ts +4 -2
- package/src/device/lock.ts +4 -2
- package/src/device/meter.ts +4 -2
- package/src/device/meterplus.ts +4 -2
- package/src/device/motion.ts +4 -2
- package/src/device/plug.ts +4 -2
- package/src/device/striplight.ts +4 -2
- package/src/platform.ts +42 -41
package/dist/platform.js
CHANGED
|
@@ -43,7 +43,7 @@ class SwitchBotPlatform {
|
|
|
43
43
|
this.axios = axios_1.default.create({
|
|
44
44
|
responseType: 'json',
|
|
45
45
|
});
|
|
46
|
-
this.version = require('../package.json').version; // eslint-disable-line @typescript-eslint/no-var-requires
|
|
46
|
+
this.version = require('../package.json').version || '1.12.8'; // eslint-disable-line @typescript-eslint/no-var-requires
|
|
47
47
|
this.logs();
|
|
48
48
|
this.debugLog('Finished initializing platform:', this.config.name);
|
|
49
49
|
// only load if configured
|
|
@@ -505,10 +505,11 @@ class SwitchBotPlatform {
|
|
|
505
505
|
if (this.registerDevice(device)) {
|
|
506
506
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
507
507
|
// if you need to update the accessory.context then you should run `api.updatePlatformAccessories`. eg.:
|
|
508
|
+
//existingAccessory.context.firmwareRevision = firmware;
|
|
508
509
|
existingAccessory.context.model = device.deviceType;
|
|
509
510
|
existingAccessory.context.deviceID = device.deviceId;
|
|
510
511
|
existingAccessory.displayName = device.deviceName;
|
|
511
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
512
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
512
513
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
513
514
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
514
515
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -531,7 +532,7 @@ class SwitchBotPlatform {
|
|
|
531
532
|
accessory.context.device = device;
|
|
532
533
|
accessory.context.model = device.deviceType;
|
|
533
534
|
accessory.context.deviceID = device.deviceId;
|
|
534
|
-
accessory.context.firmwareRevision = device.firmware
|
|
535
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
535
536
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
536
537
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
537
538
|
// create the accessory handler for the newly create accessory
|
|
@@ -560,7 +561,7 @@ class SwitchBotPlatform {
|
|
|
560
561
|
existingAccessory.context.model = device.deviceType;
|
|
561
562
|
existingAccessory.context.deviceID = device.deviceId;
|
|
562
563
|
existingAccessory.displayName = device.deviceName;
|
|
563
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
564
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
564
565
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
565
566
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
566
567
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -584,7 +585,7 @@ class SwitchBotPlatform {
|
|
|
584
585
|
accessory.context.device = device;
|
|
585
586
|
accessory.context.model = device.deviceType;
|
|
586
587
|
accessory.context.deviceID = device.deviceId;
|
|
587
|
-
accessory.context.firmwareRevision = device.firmware
|
|
588
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
588
589
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
589
590
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
590
591
|
// accessory.context.firmwareRevision = findaccessories.accessoryAttribute.softwareRevision;
|
|
@@ -613,7 +614,7 @@ class SwitchBotPlatform {
|
|
|
613
614
|
existingAccessory.context.model = device.deviceType;
|
|
614
615
|
existingAccessory.context.deviceID = device.deviceId;
|
|
615
616
|
existingAccessory.displayName = device.deviceName;
|
|
616
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
617
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
617
618
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
618
619
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
619
620
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -636,7 +637,7 @@ class SwitchBotPlatform {
|
|
|
636
637
|
accessory.context.device = device;
|
|
637
638
|
accessory.context.model = device.deviceType;
|
|
638
639
|
accessory.context.deviceID = device.deviceId;
|
|
639
|
-
accessory.context.firmwareRevision = device.firmware
|
|
640
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
640
641
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
641
642
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
642
643
|
// create the accessory handler for the newly create accessory
|
|
@@ -664,7 +665,7 @@ class SwitchBotPlatform {
|
|
|
664
665
|
existingAccessory.context.model = device.deviceType;
|
|
665
666
|
existingAccessory.context.deviceID = device.deviceId;
|
|
666
667
|
existingAccessory.displayName = device.deviceName;
|
|
667
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
668
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
668
669
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
669
670
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
670
671
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -687,7 +688,7 @@ class SwitchBotPlatform {
|
|
|
687
688
|
accessory.context.device = device;
|
|
688
689
|
accessory.context.model = device.deviceType;
|
|
689
690
|
accessory.context.deviceID = device.deviceId;
|
|
690
|
-
accessory.context.firmwareRevision = device.firmware
|
|
691
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
691
692
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
692
693
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
693
694
|
// create the accessory handler for the newly create accessory
|
|
@@ -715,7 +716,7 @@ class SwitchBotPlatform {
|
|
|
715
716
|
existingAccessory.context.model = device.deviceType;
|
|
716
717
|
existingAccessory.context.deviceID = device.deviceId;
|
|
717
718
|
existingAccessory.displayName = device.deviceName;
|
|
718
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
719
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
719
720
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
720
721
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
721
722
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -738,7 +739,7 @@ class SwitchBotPlatform {
|
|
|
738
739
|
accessory.context.device = device;
|
|
739
740
|
accessory.context.model = device.deviceType;
|
|
740
741
|
accessory.context.deviceID = device.deviceId;
|
|
741
|
-
accessory.context.firmwareRevision = device.firmware
|
|
742
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
742
743
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
743
744
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
744
745
|
// create the accessory handler for the newly create accessory
|
|
@@ -766,7 +767,7 @@ class SwitchBotPlatform {
|
|
|
766
767
|
existingAccessory.context.model = device.deviceType;
|
|
767
768
|
existingAccessory.context.deviceID = device.deviceId;
|
|
768
769
|
existingAccessory.displayName = device.deviceName;
|
|
769
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
770
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
770
771
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
771
772
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
772
773
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -789,7 +790,7 @@ class SwitchBotPlatform {
|
|
|
789
790
|
accessory.context.device = device;
|
|
790
791
|
accessory.context.model = device.deviceType;
|
|
791
792
|
accessory.context.deviceID = device.deviceId;
|
|
792
|
-
accessory.context.firmwareRevision = device.firmware
|
|
793
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
793
794
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
794
795
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
795
796
|
// create the accessory handler for the newly create accessory
|
|
@@ -817,7 +818,7 @@ class SwitchBotPlatform {
|
|
|
817
818
|
existingAccessory.context.model = device.deviceType;
|
|
818
819
|
existingAccessory.context.deviceID = device.deviceId;
|
|
819
820
|
existingAccessory.displayName = device.deviceName;
|
|
820
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
821
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
821
822
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
822
823
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
823
824
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -852,7 +853,7 @@ class SwitchBotPlatform {
|
|
|
852
853
|
accessory.context.device = device;
|
|
853
854
|
accessory.context.model = device.deviceType;
|
|
854
855
|
accessory.context.deviceID = device.deviceId;
|
|
855
|
-
accessory.context.firmwareRevision = device.firmware
|
|
856
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
856
857
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
857
858
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
858
859
|
// create the accessory handler for the newly create accessory
|
|
@@ -892,7 +893,7 @@ class SwitchBotPlatform {
|
|
|
892
893
|
existingAccessory.context.model = device.deviceType;
|
|
893
894
|
existingAccessory.context.deviceID = device.deviceId;
|
|
894
895
|
existingAccessory.displayName = device.deviceName;
|
|
895
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
896
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
896
897
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
897
898
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
898
899
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -915,7 +916,7 @@ class SwitchBotPlatform {
|
|
|
915
916
|
accessory.context.device = device;
|
|
916
917
|
accessory.context.model = device.deviceType;
|
|
917
918
|
accessory.context.deviceID = device.deviceId;
|
|
918
|
-
accessory.context.firmwareRevision = device.firmware
|
|
919
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
919
920
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
920
921
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
921
922
|
// create the accessory handler for the newly create accessory
|
|
@@ -943,7 +944,7 @@ class SwitchBotPlatform {
|
|
|
943
944
|
existingAccessory.context.model = device.deviceType;
|
|
944
945
|
existingAccessory.context.deviceID = device.deviceId;
|
|
945
946
|
existingAccessory.displayName = device.deviceName;
|
|
946
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
947
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
947
948
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
948
949
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
949
950
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -966,7 +967,7 @@ class SwitchBotPlatform {
|
|
|
966
967
|
accessory.context.device = device;
|
|
967
968
|
accessory.context.model = device.deviceType;
|
|
968
969
|
accessory.context.deviceID = device.deviceId;
|
|
969
|
-
accessory.context.firmwareRevision = device.firmware
|
|
970
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
970
971
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
971
972
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
972
973
|
// create the accessory handler for the newly create accessory
|
|
@@ -994,7 +995,7 @@ class SwitchBotPlatform {
|
|
|
994
995
|
existingAccessory.context.model = device.deviceType;
|
|
995
996
|
existingAccessory.context.deviceID = device.deviceId;
|
|
996
997
|
existingAccessory.displayName = device.deviceName;
|
|
997
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
998
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
998
999
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
999
1000
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
1000
1001
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1017,7 +1018,7 @@ class SwitchBotPlatform {
|
|
|
1017
1018
|
accessory.context.device = device;
|
|
1018
1019
|
accessory.context.model = device.deviceType;
|
|
1019
1020
|
accessory.context.deviceID = device.deviceId;
|
|
1020
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1021
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1021
1022
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1022
1023
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
1023
1024
|
// create the accessory handler for the newly create accessory
|
|
@@ -1045,7 +1046,7 @@ class SwitchBotPlatform {
|
|
|
1045
1046
|
existingAccessory.context.model = device.deviceType;
|
|
1046
1047
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1047
1048
|
existingAccessory.displayName = device.deviceName;
|
|
1048
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1049
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1049
1050
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1050
1051
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
1051
1052
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1068,7 +1069,7 @@ class SwitchBotPlatform {
|
|
|
1068
1069
|
accessory.context.device = device;
|
|
1069
1070
|
accessory.context.model = device.deviceType;
|
|
1070
1071
|
accessory.context.deviceID = device.deviceId;
|
|
1071
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1072
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1072
1073
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1073
1074
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
1074
1075
|
// create the accessory handler for the newly create accessory
|
|
@@ -1094,7 +1095,7 @@ class SwitchBotPlatform {
|
|
|
1094
1095
|
existingAccessory.context.model = device.remoteType;
|
|
1095
1096
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1096
1097
|
existingAccessory.displayName = device.deviceName;
|
|
1097
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1098
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1098
1099
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1099
1100
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1100
1101
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1113,7 +1114,7 @@ class SwitchBotPlatform {
|
|
|
1113
1114
|
accessory.context.device = device;
|
|
1114
1115
|
accessory.context.model = device.remoteType;
|
|
1115
1116
|
accessory.context.deviceID = device.deviceId;
|
|
1116
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1117
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1117
1118
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1118
1119
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1119
1120
|
// create the accessory handler for the newly create accessory
|
|
@@ -1145,7 +1146,7 @@ class SwitchBotPlatform {
|
|
|
1145
1146
|
existingAccessory.context.model = device.remoteType;
|
|
1146
1147
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1147
1148
|
existingAccessory.displayName = device.deviceName;
|
|
1148
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1149
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1149
1150
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1150
1151
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1151
1152
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1168,7 +1169,7 @@ class SwitchBotPlatform {
|
|
|
1168
1169
|
accessory.context.device = device;
|
|
1169
1170
|
accessory.context.model = device.remoteType;
|
|
1170
1171
|
accessory.context.deviceID = device.deviceId;
|
|
1171
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1172
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1172
1173
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1173
1174
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1174
1175
|
// create the accessory handler for the newly create accessory
|
|
@@ -1196,7 +1197,7 @@ class SwitchBotPlatform {
|
|
|
1196
1197
|
existingAccessory.context.model = device.remoteType;
|
|
1197
1198
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1198
1199
|
existingAccessory.displayName = device.deviceName;
|
|
1199
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1200
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1200
1201
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1201
1202
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1202
1203
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1219,7 +1220,7 @@ class SwitchBotPlatform {
|
|
|
1219
1220
|
accessory.context.device = device;
|
|
1220
1221
|
accessory.context.model = device.remoteType;
|
|
1221
1222
|
accessory.context.deviceID = device.deviceId;
|
|
1222
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1223
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1223
1224
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1224
1225
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1225
1226
|
// create the accessory handler for the newly create accessory
|
|
@@ -1247,7 +1248,7 @@ class SwitchBotPlatform {
|
|
|
1247
1248
|
existingAccessory.context.model = device.remoteType;
|
|
1248
1249
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1249
1250
|
existingAccessory.displayName = device.deviceName;
|
|
1250
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1251
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1251
1252
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1252
1253
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1253
1254
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1270,7 +1271,7 @@ class SwitchBotPlatform {
|
|
|
1270
1271
|
accessory.context.device = device;
|
|
1271
1272
|
accessory.context.model = device.remoteType;
|
|
1272
1273
|
accessory.context.deviceID = device.deviceId;
|
|
1273
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1274
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1274
1275
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1275
1276
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1276
1277
|
// create the accessory handler for the newly create accessory
|
|
@@ -1298,7 +1299,7 @@ class SwitchBotPlatform {
|
|
|
1298
1299
|
existingAccessory.context.model = device.remoteType;
|
|
1299
1300
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1300
1301
|
existingAccessory.displayName = device.deviceName;
|
|
1301
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1302
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1302
1303
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1303
1304
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1304
1305
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1321,7 +1322,7 @@ class SwitchBotPlatform {
|
|
|
1321
1322
|
accessory.context.device = device;
|
|
1322
1323
|
accessory.context.model = device.remoteType;
|
|
1323
1324
|
accessory.context.deviceID = device.deviceId;
|
|
1324
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1325
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1325
1326
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1326
1327
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1327
1328
|
// create the accessory handler for the newly create accessory
|
|
@@ -1349,7 +1350,7 @@ class SwitchBotPlatform {
|
|
|
1349
1350
|
existingAccessory.context.model = device.remoteType;
|
|
1350
1351
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1351
1352
|
existingAccessory.displayName = device.deviceName;
|
|
1352
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1353
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1353
1354
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1354
1355
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1355
1356
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1372,7 +1373,7 @@ class SwitchBotPlatform {
|
|
|
1372
1373
|
accessory.context.device = device;
|
|
1373
1374
|
accessory.context.model = device.remoteType;
|
|
1374
1375
|
accessory.context.deviceID = device.deviceId;
|
|
1375
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1376
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1376
1377
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1377
1378
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1378
1379
|
// create the accessory handler for the newly create accessory
|
|
@@ -1400,7 +1401,7 @@ class SwitchBotPlatform {
|
|
|
1400
1401
|
existingAccessory.context.model = device.remoteType;
|
|
1401
1402
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1402
1403
|
existingAccessory.displayName = device.deviceName;
|
|
1403
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1404
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1404
1405
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1405
1406
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1406
1407
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1423,7 +1424,7 @@ class SwitchBotPlatform {
|
|
|
1423
1424
|
accessory.context.device = device;
|
|
1424
1425
|
accessory.context.model = device.remoteType;
|
|
1425
1426
|
accessory.context.deviceID = device.deviceId;
|
|
1426
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1427
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1427
1428
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1428
1429
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1429
1430
|
// create the accessory handler for the newly create accessory
|
|
@@ -1451,7 +1452,7 @@ class SwitchBotPlatform {
|
|
|
1451
1452
|
existingAccessory.context.model = device.remoteType;
|
|
1452
1453
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1453
1454
|
existingAccessory.displayName = device.deviceName;
|
|
1454
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1455
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1455
1456
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1456
1457
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1457
1458
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1474,7 +1475,7 @@ class SwitchBotPlatform {
|
|
|
1474
1475
|
accessory.context.device = device;
|
|
1475
1476
|
accessory.context.model = device.remoteType;
|
|
1476
1477
|
accessory.context.deviceID = device.deviceId;
|
|
1477
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1478
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1478
1479
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1479
1480
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1480
1481
|
// create the accessory handler for the newly create accessory
|
|
@@ -1502,7 +1503,7 @@ class SwitchBotPlatform {
|
|
|
1502
1503
|
existingAccessory.context.model = device.remoteType;
|
|
1503
1504
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1504
1505
|
existingAccessory.displayName = device.deviceName;
|
|
1505
|
-
existingAccessory.context.firmwareRevision = device.firmware
|
|
1506
|
+
existingAccessory.context.firmwareRevision = device.firmware;
|
|
1506
1507
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1507
1508
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1508
1509
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1525,7 +1526,7 @@ class SwitchBotPlatform {
|
|
|
1525
1526
|
accessory.context.device = device;
|
|
1526
1527
|
accessory.context.model = device.remoteType;
|
|
1527
1528
|
accessory.context.deviceID = device.deviceId;
|
|
1528
|
-
accessory.context.firmwareRevision = device.firmware
|
|
1529
|
+
accessory.context.firmwareRevision = device.firmware;
|
|
1529
1530
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1530
1531
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1531
1532
|
// create the accessory handler for the newly create accessory
|