@switchbot/homebridge-switchbot 1.12.9-beta.4 → 1.12.9-beta.7
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/CHANGELOG.md +3 -0
- package/config.schema.json +9 -0
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +2 -1
- package/dist/device/bot.js.map +1 -1
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +2 -1
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +2 -1
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +2 -1
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/humidifier.js +2 -2
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/lock.d.ts +1 -0
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +43 -6
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +2 -1
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +2 -1
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +2 -1
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +2 -1
- package/dist/device/plug.js.map +1 -1
- package/dist/device/striplight.d.ts.map +1 -1
- package/dist/device/striplight.js +2 -1
- package/dist/device/striplight.js.map +1 -1
- package/dist/platform.js +40 -40
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +1 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js.map +1 -1
- package/package.json +2 -2
- package/src/device/bot.ts +2 -1
- package/src/device/colorbulb.ts +2 -1
- package/src/device/contact.ts +2 -1
- package/src/device/curtain.ts +2 -1
- package/src/device/humidifier.ts +2 -2
- package/src/device/lock.ts +44 -6
- package/src/device/meter.ts +2 -1
- package/src/device/meterplus.ts +2 -1
- package/src/device/motion.ts +2 -1
- package/src/device/plug.ts +2 -1
- package/src/device/striplight.ts +2 -1
- package/src/platform.ts +40 -40
- package/src/settings.ts +1 -0
package/dist/platform.js
CHANGED
|
@@ -509,7 +509,7 @@ class SwitchBotPlatform {
|
|
|
509
509
|
existingAccessory.context.model = device.deviceType;
|
|
510
510
|
existingAccessory.context.deviceID = device.deviceId;
|
|
511
511
|
existingAccessory.displayName = device.deviceName;
|
|
512
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
512
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
513
513
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
514
514
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
515
515
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -532,7 +532,7 @@ class SwitchBotPlatform {
|
|
|
532
532
|
accessory.context.device = device;
|
|
533
533
|
accessory.context.model = device.deviceType;
|
|
534
534
|
accessory.context.deviceID = device.deviceId;
|
|
535
|
-
accessory.context.firmwareRevision = this.version;
|
|
535
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
536
536
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
537
537
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
538
538
|
// create the accessory handler for the newly create accessory
|
|
@@ -561,7 +561,7 @@ class SwitchBotPlatform {
|
|
|
561
561
|
existingAccessory.context.model = device.deviceType;
|
|
562
562
|
existingAccessory.context.deviceID = device.deviceId;
|
|
563
563
|
existingAccessory.displayName = device.deviceName;
|
|
564
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
564
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
565
565
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
566
566
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
567
567
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -585,7 +585,7 @@ class SwitchBotPlatform {
|
|
|
585
585
|
accessory.context.device = device;
|
|
586
586
|
accessory.context.model = device.deviceType;
|
|
587
587
|
accessory.context.deviceID = device.deviceId;
|
|
588
|
-
accessory.context.firmwareRevision = this.version;
|
|
588
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
589
589
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
590
590
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
591
591
|
// accessory.context.firmwareRevision = findaccessories.accessoryAttribute.softwareRevision;
|
|
@@ -614,7 +614,7 @@ class SwitchBotPlatform {
|
|
|
614
614
|
existingAccessory.context.model = device.deviceType;
|
|
615
615
|
existingAccessory.context.deviceID = device.deviceId;
|
|
616
616
|
existingAccessory.displayName = device.deviceName;
|
|
617
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
617
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
618
618
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
619
619
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
620
620
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -637,7 +637,7 @@ class SwitchBotPlatform {
|
|
|
637
637
|
accessory.context.device = device;
|
|
638
638
|
accessory.context.model = device.deviceType;
|
|
639
639
|
accessory.context.deviceID = device.deviceId;
|
|
640
|
-
accessory.context.firmwareRevision = this.version;
|
|
640
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
641
641
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
642
642
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
643
643
|
// create the accessory handler for the newly create accessory
|
|
@@ -665,7 +665,7 @@ class SwitchBotPlatform {
|
|
|
665
665
|
existingAccessory.context.model = device.deviceType;
|
|
666
666
|
existingAccessory.context.deviceID = device.deviceId;
|
|
667
667
|
existingAccessory.displayName = device.deviceName;
|
|
668
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
668
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
669
669
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
670
670
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
671
671
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -688,7 +688,7 @@ class SwitchBotPlatform {
|
|
|
688
688
|
accessory.context.device = device;
|
|
689
689
|
accessory.context.model = device.deviceType;
|
|
690
690
|
accessory.context.deviceID = device.deviceId;
|
|
691
|
-
accessory.context.firmwareRevision = this.version;
|
|
691
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
692
692
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
693
693
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
694
694
|
// create the accessory handler for the newly create accessory
|
|
@@ -716,7 +716,7 @@ class SwitchBotPlatform {
|
|
|
716
716
|
existingAccessory.context.model = device.deviceType;
|
|
717
717
|
existingAccessory.context.deviceID = device.deviceId;
|
|
718
718
|
existingAccessory.displayName = device.deviceName;
|
|
719
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
719
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
720
720
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
721
721
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
722
722
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -739,7 +739,7 @@ class SwitchBotPlatform {
|
|
|
739
739
|
accessory.context.device = device;
|
|
740
740
|
accessory.context.model = device.deviceType;
|
|
741
741
|
accessory.context.deviceID = device.deviceId;
|
|
742
|
-
accessory.context.firmwareRevision = this.version;
|
|
742
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
743
743
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
744
744
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
745
745
|
// create the accessory handler for the newly create accessory
|
|
@@ -767,7 +767,7 @@ class SwitchBotPlatform {
|
|
|
767
767
|
existingAccessory.context.model = device.deviceType;
|
|
768
768
|
existingAccessory.context.deviceID = device.deviceId;
|
|
769
769
|
existingAccessory.displayName = device.deviceName;
|
|
770
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
770
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
771
771
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
772
772
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
773
773
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -790,7 +790,7 @@ class SwitchBotPlatform {
|
|
|
790
790
|
accessory.context.device = device;
|
|
791
791
|
accessory.context.model = device.deviceType;
|
|
792
792
|
accessory.context.deviceID = device.deviceId;
|
|
793
|
-
accessory.context.firmwareRevision = this.version;
|
|
793
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
794
794
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
795
795
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
796
796
|
// create the accessory handler for the newly create accessory
|
|
@@ -818,7 +818,7 @@ class SwitchBotPlatform {
|
|
|
818
818
|
existingAccessory.context.model = device.deviceType;
|
|
819
819
|
existingAccessory.context.deviceID = device.deviceId;
|
|
820
820
|
existingAccessory.displayName = device.deviceName;
|
|
821
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
821
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
822
822
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
823
823
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
824
824
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -853,7 +853,7 @@ class SwitchBotPlatform {
|
|
|
853
853
|
accessory.context.device = device;
|
|
854
854
|
accessory.context.model = device.deviceType;
|
|
855
855
|
accessory.context.deviceID = device.deviceId;
|
|
856
|
-
accessory.context.firmwareRevision = this.version;
|
|
856
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
857
857
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
858
858
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
859
859
|
// create the accessory handler for the newly create accessory
|
|
@@ -893,7 +893,7 @@ class SwitchBotPlatform {
|
|
|
893
893
|
existingAccessory.context.model = device.deviceType;
|
|
894
894
|
existingAccessory.context.deviceID = device.deviceId;
|
|
895
895
|
existingAccessory.displayName = device.deviceName;
|
|
896
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
896
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
897
897
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
898
898
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
899
899
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -916,7 +916,7 @@ class SwitchBotPlatform {
|
|
|
916
916
|
accessory.context.device = device;
|
|
917
917
|
accessory.context.model = device.deviceType;
|
|
918
918
|
accessory.context.deviceID = device.deviceId;
|
|
919
|
-
accessory.context.firmwareRevision = this.version;
|
|
919
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
920
920
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
921
921
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
922
922
|
// create the accessory handler for the newly create accessory
|
|
@@ -944,7 +944,7 @@ class SwitchBotPlatform {
|
|
|
944
944
|
existingAccessory.context.model = device.deviceType;
|
|
945
945
|
existingAccessory.context.deviceID = device.deviceId;
|
|
946
946
|
existingAccessory.displayName = device.deviceName;
|
|
947
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
947
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
948
948
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
949
949
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
950
950
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -967,7 +967,7 @@ class SwitchBotPlatform {
|
|
|
967
967
|
accessory.context.device = device;
|
|
968
968
|
accessory.context.model = device.deviceType;
|
|
969
969
|
accessory.context.deviceID = device.deviceId;
|
|
970
|
-
accessory.context.firmwareRevision = this.version;
|
|
970
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
971
971
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
972
972
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
973
973
|
// create the accessory handler for the newly create accessory
|
|
@@ -995,7 +995,7 @@ class SwitchBotPlatform {
|
|
|
995
995
|
existingAccessory.context.model = device.deviceType;
|
|
996
996
|
existingAccessory.context.deviceID = device.deviceId;
|
|
997
997
|
existingAccessory.displayName = device.deviceName;
|
|
998
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
998
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
999
999
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1000
1000
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
1001
1001
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1018,7 +1018,7 @@ class SwitchBotPlatform {
|
|
|
1018
1018
|
accessory.context.device = device;
|
|
1019
1019
|
accessory.context.model = device.deviceType;
|
|
1020
1020
|
accessory.context.deviceID = device.deviceId;
|
|
1021
|
-
accessory.context.firmwareRevision = this.version;
|
|
1021
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
1022
1022
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1023
1023
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
1024
1024
|
// create the accessory handler for the newly create accessory
|
|
@@ -1046,7 +1046,7 @@ class SwitchBotPlatform {
|
|
|
1046
1046
|
existingAccessory.context.model = device.deviceType;
|
|
1047
1047
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1048
1048
|
existingAccessory.displayName = device.deviceName;
|
|
1049
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
1049
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
1050
1050
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1051
1051
|
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
1052
1052
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1069,7 +1069,7 @@ class SwitchBotPlatform {
|
|
|
1069
1069
|
accessory.context.device = device;
|
|
1070
1070
|
accessory.context.model = device.deviceType;
|
|
1071
1071
|
accessory.context.deviceID = device.deviceId;
|
|
1072
|
-
accessory.context.firmwareRevision = this.version;
|
|
1072
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
1073
1073
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1074
1074
|
await this.connectionTypeNewAccessory(device, accessory);
|
|
1075
1075
|
// create the accessory handler for the newly create accessory
|
|
@@ -1095,7 +1095,7 @@ class SwitchBotPlatform {
|
|
|
1095
1095
|
existingAccessory.context.model = device.remoteType;
|
|
1096
1096
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1097
1097
|
existingAccessory.displayName = device.deviceName;
|
|
1098
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
1098
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
1099
1099
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1100
1100
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1101
1101
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1114,7 +1114,7 @@ class SwitchBotPlatform {
|
|
|
1114
1114
|
accessory.context.device = device;
|
|
1115
1115
|
accessory.context.model = device.remoteType;
|
|
1116
1116
|
accessory.context.deviceID = device.deviceId;
|
|
1117
|
-
accessory.context.firmwareRevision = this.version;
|
|
1117
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
1118
1118
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1119
1119
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1120
1120
|
// create the accessory handler for the newly create accessory
|
|
@@ -1146,7 +1146,7 @@ class SwitchBotPlatform {
|
|
|
1146
1146
|
existingAccessory.context.model = device.remoteType;
|
|
1147
1147
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1148
1148
|
existingAccessory.displayName = device.deviceName;
|
|
1149
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
1149
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
1150
1150
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1151
1151
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1152
1152
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1169,7 +1169,7 @@ class SwitchBotPlatform {
|
|
|
1169
1169
|
accessory.context.device = device;
|
|
1170
1170
|
accessory.context.model = device.remoteType;
|
|
1171
1171
|
accessory.context.deviceID = device.deviceId;
|
|
1172
|
-
accessory.context.firmwareRevision = this.version;
|
|
1172
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
1173
1173
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1174
1174
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1175
1175
|
// create the accessory handler for the newly create accessory
|
|
@@ -1197,7 +1197,7 @@ class SwitchBotPlatform {
|
|
|
1197
1197
|
existingAccessory.context.model = device.remoteType;
|
|
1198
1198
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1199
1199
|
existingAccessory.displayName = device.deviceName;
|
|
1200
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
1200
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
1201
1201
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1202
1202
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1203
1203
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1220,7 +1220,7 @@ class SwitchBotPlatform {
|
|
|
1220
1220
|
accessory.context.device = device;
|
|
1221
1221
|
accessory.context.model = device.remoteType;
|
|
1222
1222
|
accessory.context.deviceID = device.deviceId;
|
|
1223
|
-
accessory.context.firmwareRevision = this.version;
|
|
1223
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
1224
1224
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1225
1225
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1226
1226
|
// create the accessory handler for the newly create accessory
|
|
@@ -1248,7 +1248,7 @@ class SwitchBotPlatform {
|
|
|
1248
1248
|
existingAccessory.context.model = device.remoteType;
|
|
1249
1249
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1250
1250
|
existingAccessory.displayName = device.deviceName;
|
|
1251
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
1251
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
1252
1252
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1253
1253
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1254
1254
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1271,7 +1271,7 @@ class SwitchBotPlatform {
|
|
|
1271
1271
|
accessory.context.device = device;
|
|
1272
1272
|
accessory.context.model = device.remoteType;
|
|
1273
1273
|
accessory.context.deviceID = device.deviceId;
|
|
1274
|
-
accessory.context.firmwareRevision = this.version;
|
|
1274
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
1275
1275
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1276
1276
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1277
1277
|
// create the accessory handler for the newly create accessory
|
|
@@ -1299,7 +1299,7 @@ class SwitchBotPlatform {
|
|
|
1299
1299
|
existingAccessory.context.model = device.remoteType;
|
|
1300
1300
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1301
1301
|
existingAccessory.displayName = device.deviceName;
|
|
1302
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
1302
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
1303
1303
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1304
1304
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1305
1305
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1322,7 +1322,7 @@ class SwitchBotPlatform {
|
|
|
1322
1322
|
accessory.context.device = device;
|
|
1323
1323
|
accessory.context.model = device.remoteType;
|
|
1324
1324
|
accessory.context.deviceID = device.deviceId;
|
|
1325
|
-
accessory.context.firmwareRevision = this.version;
|
|
1325
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
1326
1326
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1327
1327
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1328
1328
|
// create the accessory handler for the newly create accessory
|
|
@@ -1350,7 +1350,7 @@ class SwitchBotPlatform {
|
|
|
1350
1350
|
existingAccessory.context.model = device.remoteType;
|
|
1351
1351
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1352
1352
|
existingAccessory.displayName = device.deviceName;
|
|
1353
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
1353
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
1354
1354
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1355
1355
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1356
1356
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1373,7 +1373,7 @@ class SwitchBotPlatform {
|
|
|
1373
1373
|
accessory.context.device = device;
|
|
1374
1374
|
accessory.context.model = device.remoteType;
|
|
1375
1375
|
accessory.context.deviceID = device.deviceId;
|
|
1376
|
-
accessory.context.firmwareRevision = this.version;
|
|
1376
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
1377
1377
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1378
1378
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1379
1379
|
// create the accessory handler for the newly create accessory
|
|
@@ -1401,7 +1401,7 @@ class SwitchBotPlatform {
|
|
|
1401
1401
|
existingAccessory.context.model = device.remoteType;
|
|
1402
1402
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1403
1403
|
existingAccessory.displayName = device.deviceName;
|
|
1404
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
1404
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
1405
1405
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1406
1406
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1407
1407
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1424,7 +1424,7 @@ class SwitchBotPlatform {
|
|
|
1424
1424
|
accessory.context.device = device;
|
|
1425
1425
|
accessory.context.model = device.remoteType;
|
|
1426
1426
|
accessory.context.deviceID = device.deviceId;
|
|
1427
|
-
accessory.context.firmwareRevision = this.version;
|
|
1427
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
1428
1428
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1429
1429
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1430
1430
|
// create the accessory handler for the newly create accessory
|
|
@@ -1452,7 +1452,7 @@ class SwitchBotPlatform {
|
|
|
1452
1452
|
existingAccessory.context.model = device.remoteType;
|
|
1453
1453
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1454
1454
|
existingAccessory.displayName = device.deviceName;
|
|
1455
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
1455
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
1456
1456
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1457
1457
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1458
1458
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1475,7 +1475,7 @@ class SwitchBotPlatform {
|
|
|
1475
1475
|
accessory.context.device = device;
|
|
1476
1476
|
accessory.context.model = device.remoteType;
|
|
1477
1477
|
accessory.context.deviceID = device.deviceId;
|
|
1478
|
-
accessory.context.firmwareRevision = this.version;
|
|
1478
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
1479
1479
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1480
1480
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1481
1481
|
// create the accessory handler for the newly create accessory
|
|
@@ -1503,7 +1503,7 @@ class SwitchBotPlatform {
|
|
|
1503
1503
|
existingAccessory.context.model = device.remoteType;
|
|
1504
1504
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1505
1505
|
existingAccessory.displayName = device.deviceName;
|
|
1506
|
-
existingAccessory.context.firmwareRevision = this.version;
|
|
1506
|
+
existingAccessory.context.firmwareRevision = device.firmware || this.version;
|
|
1507
1507
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1508
1508
|
await this.connectionTypeExistingIRAccessory(existingAccessory);
|
|
1509
1509
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
@@ -1526,7 +1526,7 @@ class SwitchBotPlatform {
|
|
|
1526
1526
|
accessory.context.device = device;
|
|
1527
1527
|
accessory.context.model = device.remoteType;
|
|
1528
1528
|
accessory.context.deviceID = device.deviceId;
|
|
1529
|
-
accessory.context.firmwareRevision = this.version;
|
|
1529
|
+
accessory.context.firmwareRevision = device.firmware || this.version;
|
|
1530
1530
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1531
1531
|
await this.connectionTypeNewIRAccessory(accessory);
|
|
1532
1532
|
// create the accessory handler for the newly create accessory
|