@switchbot/homebridge-switchbot 3.5.0-beta.30 → 3.5.0-beta.32
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/device.d.ts.map +1 -1
- package/dist/device/device.js +14 -3
- package/dist/device/device.js.map +1 -1
- package/dist/irdevice/irdevice.d.ts.map +1 -1
- package/dist/irdevice/irdevice.js +5 -2
- package/dist/irdevice/irdevice.js.map +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +54 -160
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +1 -1
- package/package.json +1 -1
- package/src/device/device.ts +14 -3
- package/src/irdevice/irdevice.ts +4 -2
- package/src/platform.ts +54 -160
- package/src/settings.ts +1 -1
package/dist/platform.js
CHANGED
|
@@ -797,9 +797,7 @@ export class SwitchBotPlatform {
|
|
|
797
797
|
existingAccessory.context.model = device.deviceType;
|
|
798
798
|
existingAccessory.context.deviceID = device.deviceId;
|
|
799
799
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
800
|
-
|
|
801
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
802
|
-
}
|
|
800
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
803
801
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
804
802
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
805
803
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -825,9 +823,7 @@ export class SwitchBotPlatform {
|
|
|
825
823
|
accessory.context.device = device;
|
|
826
824
|
accessory.context.model = device.deviceType;
|
|
827
825
|
accessory.context.deviceID = device.deviceId;
|
|
828
|
-
|
|
829
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
830
|
-
}
|
|
826
|
+
accessory.context.FirmwareRevision = device.version;
|
|
831
827
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
832
828
|
accessory.context.connectionType = await this.connectionType(device);
|
|
833
829
|
// create the accessory handler for the newly create accessory
|
|
@@ -854,9 +850,7 @@ export class SwitchBotPlatform {
|
|
|
854
850
|
existingAccessory.context.model = device.deviceType;
|
|
855
851
|
existingAccessory.context.deviceID = device.deviceId;
|
|
856
852
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
857
|
-
|
|
858
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
859
|
-
}
|
|
853
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
860
854
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
861
855
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
862
856
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -882,9 +876,7 @@ export class SwitchBotPlatform {
|
|
|
882
876
|
accessory.context.device = device;
|
|
883
877
|
accessory.context.model = device.deviceType;
|
|
884
878
|
accessory.context.deviceID = device.deviceId;
|
|
885
|
-
|
|
886
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
887
|
-
}
|
|
879
|
+
accessory.context.FirmwareRevision = device.version;
|
|
888
880
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
889
881
|
accessory.context.connectionType = await this.connectionType(device);
|
|
890
882
|
// accessory.context.FirmwareRevision = findaccessories.accessoryAttribute.softwareRevision;
|
|
@@ -912,9 +904,7 @@ export class SwitchBotPlatform {
|
|
|
912
904
|
existingAccessory.context.model = device.deviceType;
|
|
913
905
|
existingAccessory.context.deviceID = device.deviceId;
|
|
914
906
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
915
|
-
|
|
916
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
917
|
-
}
|
|
907
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
918
908
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
919
909
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
920
910
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -940,9 +930,7 @@ export class SwitchBotPlatform {
|
|
|
940
930
|
accessory.context.device = device;
|
|
941
931
|
accessory.context.model = device.deviceType;
|
|
942
932
|
accessory.context.deviceID = device.deviceId;
|
|
943
|
-
|
|
944
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
945
|
-
}
|
|
933
|
+
accessory.context.FirmwareRevision = device.version;
|
|
946
934
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
947
935
|
accessory.context.connectionType = await this.connectionType(device);
|
|
948
936
|
// create the accessory handler for the newly create accessory
|
|
@@ -970,9 +958,7 @@ export class SwitchBotPlatform {
|
|
|
970
958
|
existingAccessory.context.model = device.deviceType;
|
|
971
959
|
existingAccessory.context.deviceID = device.deviceId;
|
|
972
960
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
973
|
-
|
|
974
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
975
|
-
}
|
|
961
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
976
962
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
977
963
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
978
964
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -998,9 +984,7 @@ export class SwitchBotPlatform {
|
|
|
998
984
|
accessory.context.device = device;
|
|
999
985
|
accessory.context.model = device.deviceType;
|
|
1000
986
|
accessory.context.deviceID = device.deviceId;
|
|
1001
|
-
|
|
1002
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1003
|
-
}
|
|
987
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1004
988
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1005
989
|
accessory.context.connectionType = await this.connectionType(device);
|
|
1006
990
|
// create the accessory handler for the newly create accessory
|
|
@@ -1028,9 +1012,7 @@ export class SwitchBotPlatform {
|
|
|
1028
1012
|
existingAccessory.context.model = device.deviceType;
|
|
1029
1013
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1030
1014
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1031
|
-
|
|
1032
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
1033
|
-
}
|
|
1015
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1034
1016
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1035
1017
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1036
1018
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1056,9 +1038,7 @@ export class SwitchBotPlatform {
|
|
|
1056
1038
|
accessory.context.device = device;
|
|
1057
1039
|
accessory.context.model = device.deviceType;
|
|
1058
1040
|
accessory.context.deviceID = device.deviceId;
|
|
1059
|
-
|
|
1060
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1061
|
-
}
|
|
1041
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1062
1042
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1063
1043
|
accessory.context.connectionType = await this.connectionType(device);
|
|
1064
1044
|
// create the accessory handler for the newly create accessory
|
|
@@ -1085,9 +1065,7 @@ export class SwitchBotPlatform {
|
|
|
1085
1065
|
existingAccessory.context.model = device.deviceType;
|
|
1086
1066
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1087
1067
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1088
|
-
|
|
1089
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
1090
|
-
}
|
|
1068
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1091
1069
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1092
1070
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1093
1071
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1113,9 +1091,7 @@ export class SwitchBotPlatform {
|
|
|
1113
1091
|
accessory.context.device = device;
|
|
1114
1092
|
accessory.context.model = device.deviceType;
|
|
1115
1093
|
accessory.context.deviceID = device.deviceId;
|
|
1116
|
-
|
|
1117
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1118
|
-
}
|
|
1094
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1119
1095
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1120
1096
|
accessory.context.connectionType = await this.connectionType(device);
|
|
1121
1097
|
// create the accessory handler for the newly create accessory
|
|
@@ -1142,9 +1118,7 @@ export class SwitchBotPlatform {
|
|
|
1142
1118
|
existingAccessory.context.model = device.deviceType;
|
|
1143
1119
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1144
1120
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1145
|
-
|
|
1146
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
1147
|
-
}
|
|
1121
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1148
1122
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1149
1123
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1150
1124
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1170,9 +1144,7 @@ export class SwitchBotPlatform {
|
|
|
1170
1144
|
accessory.context.device = device;
|
|
1171
1145
|
accessory.context.model = device.deviceType;
|
|
1172
1146
|
accessory.context.deviceID = device.deviceId;
|
|
1173
|
-
|
|
1174
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1175
|
-
}
|
|
1147
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1176
1148
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1177
1149
|
accessory.context.connectionType = await this.connectionType(device);
|
|
1178
1150
|
// create the accessory handler for the newly create accessory
|
|
@@ -1199,9 +1171,7 @@ export class SwitchBotPlatform {
|
|
|
1199
1171
|
existingAccessory.context.model = device.deviceType;
|
|
1200
1172
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1201
1173
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1202
|
-
|
|
1203
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
1204
|
-
}
|
|
1174
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1205
1175
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1206
1176
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1207
1177
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1227,9 +1197,7 @@ export class SwitchBotPlatform {
|
|
|
1227
1197
|
accessory.context.device = device;
|
|
1228
1198
|
accessory.context.model = device.deviceType;
|
|
1229
1199
|
accessory.context.deviceID = device.deviceId;
|
|
1230
|
-
|
|
1231
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1232
|
-
}
|
|
1200
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1233
1201
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1234
1202
|
accessory.context.connectionType = await this.connectionType(device);
|
|
1235
1203
|
// create the accessory handler for the newly create accessory
|
|
@@ -1256,9 +1224,7 @@ export class SwitchBotPlatform {
|
|
|
1256
1224
|
existingAccessory.context.model = device.deviceType;
|
|
1257
1225
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1258
1226
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1259
|
-
|
|
1260
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
1261
|
-
}
|
|
1227
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1262
1228
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1263
1229
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1264
1230
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1284,9 +1250,7 @@ export class SwitchBotPlatform {
|
|
|
1284
1250
|
accessory.context.device = device;
|
|
1285
1251
|
accessory.context.model = device.deviceType;
|
|
1286
1252
|
accessory.context.deviceID = device.deviceId;
|
|
1287
|
-
|
|
1288
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1289
|
-
}
|
|
1253
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1290
1254
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1291
1255
|
accessory.context.connectionType = await this.connectionType(device);
|
|
1292
1256
|
// create the accessory handler for the newly create accessory
|
|
@@ -1313,9 +1277,7 @@ export class SwitchBotPlatform {
|
|
|
1313
1277
|
existingAccessory.context.model = device.deviceType;
|
|
1314
1278
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1315
1279
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1316
|
-
|
|
1317
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
1318
|
-
}
|
|
1280
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1319
1281
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1320
1282
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1321
1283
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1353,9 +1315,7 @@ export class SwitchBotPlatform {
|
|
|
1353
1315
|
accessory.context.device = device;
|
|
1354
1316
|
accessory.context.model = device.deviceType;
|
|
1355
1317
|
accessory.context.deviceID = device.deviceId;
|
|
1356
|
-
|
|
1357
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1358
|
-
}
|
|
1318
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1359
1319
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1360
1320
|
accessory.context.connectionType = await this.connectionType(device);
|
|
1361
1321
|
// create the accessory handler for the newly create accessory
|
|
@@ -1382,9 +1342,7 @@ export class SwitchBotPlatform {
|
|
|
1382
1342
|
existingAccessory.context.model = device.deviceType;
|
|
1383
1343
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1384
1344
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1385
|
-
|
|
1386
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
1387
|
-
}
|
|
1345
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1388
1346
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1389
1347
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1390
1348
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1422,9 +1380,7 @@ export class SwitchBotPlatform {
|
|
|
1422
1380
|
accessory.context.device = device;
|
|
1423
1381
|
accessory.context.model = device.deviceType;
|
|
1424
1382
|
accessory.context.deviceID = device.deviceId;
|
|
1425
|
-
|
|
1426
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1427
|
-
}
|
|
1383
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1428
1384
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1429
1385
|
accessory.context.connectionType = await this.connectionType(device);
|
|
1430
1386
|
// create the accessory handler for the newly create accessory
|
|
@@ -1451,9 +1407,7 @@ export class SwitchBotPlatform {
|
|
|
1451
1407
|
existingAccessory.context.model = device.deviceType;
|
|
1452
1408
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1453
1409
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1454
|
-
|
|
1455
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
1456
|
-
}
|
|
1410
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1457
1411
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1458
1412
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1459
1413
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1479,9 +1433,7 @@ export class SwitchBotPlatform {
|
|
|
1479
1433
|
accessory.context.device = device;
|
|
1480
1434
|
accessory.context.model = device.deviceType;
|
|
1481
1435
|
accessory.context.deviceID = device.deviceId;
|
|
1482
|
-
|
|
1483
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1484
|
-
}
|
|
1436
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1485
1437
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1486
1438
|
accessory.context.connectionType = await this.connectionType(device);
|
|
1487
1439
|
// create the accessory handler for the newly create accessory
|
|
@@ -1508,9 +1460,7 @@ export class SwitchBotPlatform {
|
|
|
1508
1460
|
existingAccessory.context.model = device.deviceType;
|
|
1509
1461
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1510
1462
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1511
|
-
|
|
1512
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
1513
|
-
}
|
|
1463
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1514
1464
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1515
1465
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1516
1466
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1536,9 +1486,7 @@ export class SwitchBotPlatform {
|
|
|
1536
1486
|
accessory.context.device = device;
|
|
1537
1487
|
accessory.context.model = device.deviceType;
|
|
1538
1488
|
accessory.context.deviceID = device.deviceId;
|
|
1539
|
-
|
|
1540
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1541
|
-
}
|
|
1489
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1542
1490
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1543
1491
|
accessory.context.connectionType = await this.connectionType(device);
|
|
1544
1492
|
// create the accessory handler for the newly create accessory
|
|
@@ -1565,9 +1513,7 @@ export class SwitchBotPlatform {
|
|
|
1565
1513
|
existingAccessory.context.model = device.deviceType;
|
|
1566
1514
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1567
1515
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1568
|
-
|
|
1569
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
1570
|
-
}
|
|
1516
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1571
1517
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1572
1518
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1573
1519
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1593,9 +1539,7 @@ export class SwitchBotPlatform {
|
|
|
1593
1539
|
accessory.context.device = device;
|
|
1594
1540
|
accessory.context.model = device.deviceType;
|
|
1595
1541
|
accessory.context.deviceID = device.deviceId;
|
|
1596
|
-
|
|
1597
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1598
|
-
}
|
|
1542
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1599
1543
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1600
1544
|
accessory.context.connectionType = await this.connectionType(device);
|
|
1601
1545
|
// create the accessory handler for the newly create accessory
|
|
@@ -1622,9 +1566,7 @@ export class SwitchBotPlatform {
|
|
|
1622
1566
|
existingAccessory.context.model = device.deviceType;
|
|
1623
1567
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1624
1568
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1625
|
-
|
|
1626
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
1627
|
-
}
|
|
1569
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1628
1570
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1629
1571
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1630
1572
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1650,9 +1592,7 @@ export class SwitchBotPlatform {
|
|
|
1650
1592
|
accessory.context.device = device;
|
|
1651
1593
|
accessory.context.model = device.deviceType;
|
|
1652
1594
|
accessory.context.deviceID = device.deviceId;
|
|
1653
|
-
|
|
1654
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1655
|
-
}
|
|
1595
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1656
1596
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1657
1597
|
accessory.context.connectionType = await this.connectionType(device);
|
|
1658
1598
|
// create the accessory handler for the newly create accessory
|
|
@@ -1679,9 +1619,7 @@ export class SwitchBotPlatform {
|
|
|
1679
1619
|
existingAccessory.context.model = device.deviceType;
|
|
1680
1620
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1681
1621
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1682
|
-
|
|
1683
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
1684
|
-
}
|
|
1622
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1685
1623
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1686
1624
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1687
1625
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1707,9 +1645,7 @@ export class SwitchBotPlatform {
|
|
|
1707
1645
|
accessory.context.device = device;
|
|
1708
1646
|
accessory.context.model = device.deviceType;
|
|
1709
1647
|
accessory.context.deviceID = device.deviceId;
|
|
1710
|
-
|
|
1711
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1712
|
-
}
|
|
1648
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1713
1649
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1714
1650
|
accessory.context.connectionType = await this.connectionType(device);
|
|
1715
1651
|
// create the accessory handler for the newly create accessory
|
|
@@ -1736,9 +1672,7 @@ export class SwitchBotPlatform {
|
|
|
1736
1672
|
existingAccessory.context.model = device.deviceType;
|
|
1737
1673
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1738
1674
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1739
|
-
|
|
1740
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
1741
|
-
}
|
|
1675
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1742
1676
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1743
1677
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1744
1678
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1764,9 +1698,7 @@ export class SwitchBotPlatform {
|
|
|
1764
1698
|
accessory.context.device = device;
|
|
1765
1699
|
accessory.context.model = device.deviceType;
|
|
1766
1700
|
accessory.context.deviceID = device.deviceId;
|
|
1767
|
-
|
|
1768
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1769
|
-
}
|
|
1701
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1770
1702
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1771
1703
|
accessory.context.connectionType = await this.connectionType(device);
|
|
1772
1704
|
// create the accessory handler for the newly create accessory
|
|
@@ -1793,9 +1725,7 @@ export class SwitchBotPlatform {
|
|
|
1793
1725
|
existingAccessory.context.model = device.deviceType;
|
|
1794
1726
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1795
1727
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1796
|
-
|
|
1797
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
1798
|
-
}
|
|
1728
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1799
1729
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1800
1730
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1801
1731
|
existingAccessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1821,9 +1751,7 @@ export class SwitchBotPlatform {
|
|
|
1821
1751
|
accessory.context.device = device;
|
|
1822
1752
|
accessory.context.model = device.deviceType;
|
|
1823
1753
|
accessory.context.deviceID = device.deviceId;
|
|
1824
|
-
|
|
1825
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1826
|
-
}
|
|
1754
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1827
1755
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1828
1756
|
accessory.context.connectionType = await this.connectionType(device);
|
|
1829
1757
|
// create the accessory handler for the newly create accessory
|
|
@@ -1848,7 +1776,7 @@ export class SwitchBotPlatform {
|
|
|
1848
1776
|
existingAccessory.context.model = device.remoteType;
|
|
1849
1777
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1850
1778
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1851
|
-
existingAccessory.context.FirmwareRevision = device.
|
|
1779
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1852
1780
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1853
1781
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1854
1782
|
existingAccessory.context.connectionType = device.connectionType;
|
|
@@ -1870,9 +1798,7 @@ export class SwitchBotPlatform {
|
|
|
1870
1798
|
accessory.context.device = device;
|
|
1871
1799
|
accessory.context.model = device.remoteType;
|
|
1872
1800
|
accessory.context.deviceID = device.deviceId;
|
|
1873
|
-
|
|
1874
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1875
|
-
}
|
|
1801
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1876
1802
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1877
1803
|
accessory.context.connectionType = device.connectionType;
|
|
1878
1804
|
// create the accessory handler for the newly create accessory
|
|
@@ -1898,9 +1824,7 @@ export class SwitchBotPlatform {
|
|
|
1898
1824
|
existingAccessory.context.model = device.remoteType;
|
|
1899
1825
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1900
1826
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1901
|
-
|
|
1902
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
1903
|
-
}
|
|
1827
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1904
1828
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1905
1829
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1906
1830
|
existingAccessory.context.connectionType = device.connectionType;
|
|
@@ -1926,9 +1850,7 @@ export class SwitchBotPlatform {
|
|
|
1926
1850
|
accessory.context.device = device;
|
|
1927
1851
|
accessory.context.model = device.remoteType;
|
|
1928
1852
|
accessory.context.deviceID = device.deviceId;
|
|
1929
|
-
|
|
1930
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1931
|
-
}
|
|
1853
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1932
1854
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1933
1855
|
accessory.context.connectionType = device.connectionType;
|
|
1934
1856
|
// create the accessory handler for the newly create accessory
|
|
@@ -1955,9 +1877,7 @@ export class SwitchBotPlatform {
|
|
|
1955
1877
|
existingAccessory.context.model = device.remoteType;
|
|
1956
1878
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1957
1879
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1958
|
-
|
|
1959
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
1960
|
-
}
|
|
1880
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
1961
1881
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1962
1882
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
1963
1883
|
existingAccessory.context.connectionType = device.connectionType;
|
|
@@ -1983,9 +1903,7 @@ export class SwitchBotPlatform {
|
|
|
1983
1903
|
accessory.context.device = device;
|
|
1984
1904
|
accessory.context.model = device.remoteType;
|
|
1985
1905
|
accessory.context.deviceID = device.deviceId;
|
|
1986
|
-
|
|
1987
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
1988
|
-
}
|
|
1906
|
+
accessory.context.FirmwareRevision = device.version;
|
|
1989
1907
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1990
1908
|
accessory.context.connectionType = device.connectionType;
|
|
1991
1909
|
// create the accessory handler for the newly create accessory
|
|
@@ -2012,9 +1930,7 @@ export class SwitchBotPlatform {
|
|
|
2012
1930
|
existingAccessory.context.model = device.remoteType;
|
|
2013
1931
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2014
1932
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2015
|
-
|
|
2016
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
2017
|
-
}
|
|
1933
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
2018
1934
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2019
1935
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
2020
1936
|
existingAccessory.context.connectionType = device.connectionType;
|
|
@@ -2040,9 +1956,7 @@ export class SwitchBotPlatform {
|
|
|
2040
1956
|
accessory.context.device = device;
|
|
2041
1957
|
accessory.context.model = device.remoteType;
|
|
2042
1958
|
accessory.context.deviceID = device.deviceId;
|
|
2043
|
-
|
|
2044
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
2045
|
-
}
|
|
1959
|
+
accessory.context.FirmwareRevision = device.version;
|
|
2046
1960
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2047
1961
|
accessory.context.connectionType = device.connectionType;
|
|
2048
1962
|
// create the accessory handler for the newly create accessory
|
|
@@ -2069,9 +1983,7 @@ export class SwitchBotPlatform {
|
|
|
2069
1983
|
existingAccessory.context.model = device.remoteType;
|
|
2070
1984
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2071
1985
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2072
|
-
|
|
2073
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
2074
|
-
}
|
|
1986
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
2075
1987
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2076
1988
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
2077
1989
|
existingAccessory.context.connectionType = device.connectionType;
|
|
@@ -2097,9 +2009,7 @@ export class SwitchBotPlatform {
|
|
|
2097
2009
|
accessory.context.device = device;
|
|
2098
2010
|
accessory.context.model = device.remoteType;
|
|
2099
2011
|
accessory.context.deviceID = device.deviceId;
|
|
2100
|
-
|
|
2101
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
2102
|
-
}
|
|
2012
|
+
accessory.context.FirmwareRevision = device.version;
|
|
2103
2013
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2104
2014
|
accessory.context.connectionType = device.connectionType;
|
|
2105
2015
|
// create the accessory handler for the newly create accessory
|
|
@@ -2126,9 +2036,7 @@ export class SwitchBotPlatform {
|
|
|
2126
2036
|
existingAccessory.context.model = device.remoteType;
|
|
2127
2037
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2128
2038
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2129
|
-
|
|
2130
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
2131
|
-
}
|
|
2039
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
2132
2040
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2133
2041
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
2134
2042
|
existingAccessory.context.connectionType = device.connectionType;
|
|
@@ -2154,9 +2062,7 @@ export class SwitchBotPlatform {
|
|
|
2154
2062
|
accessory.context.device = device;
|
|
2155
2063
|
accessory.context.model = device.remoteType;
|
|
2156
2064
|
accessory.context.deviceID = device.deviceId;
|
|
2157
|
-
|
|
2158
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
2159
|
-
}
|
|
2065
|
+
accessory.context.FirmwareRevision = device.version;
|
|
2160
2066
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2161
2067
|
accessory.context.connectionType = device.connectionType;
|
|
2162
2068
|
// create the accessory handler for the newly create accessory
|
|
@@ -2183,9 +2089,7 @@ export class SwitchBotPlatform {
|
|
|
2183
2089
|
existingAccessory.context.model = device.remoteType;
|
|
2184
2090
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2185
2091
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2186
|
-
|
|
2187
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
2188
|
-
}
|
|
2092
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
2189
2093
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2190
2094
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
2191
2095
|
existingAccessory.context.connectionType = device.connectionType;
|
|
@@ -2211,9 +2115,7 @@ export class SwitchBotPlatform {
|
|
|
2211
2115
|
accessory.context.device = device;
|
|
2212
2116
|
accessory.context.model = device.remoteType;
|
|
2213
2117
|
accessory.context.deviceID = device.deviceId;
|
|
2214
|
-
|
|
2215
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
2216
|
-
}
|
|
2118
|
+
accessory.context.FirmwareRevision = device.version;
|
|
2217
2119
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2218
2120
|
accessory.context.connectionType = device.connectionType;
|
|
2219
2121
|
// create the accessory handler for the newly create accessory
|
|
@@ -2240,9 +2142,7 @@ export class SwitchBotPlatform {
|
|
|
2240
2142
|
existingAccessory.context.model = device.remoteType;
|
|
2241
2143
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2242
2144
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2243
|
-
|
|
2244
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
2245
|
-
}
|
|
2145
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
2246
2146
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2247
2147
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
2248
2148
|
existingAccessory.context.connectionType = device.connectionType;
|
|
@@ -2268,9 +2168,7 @@ export class SwitchBotPlatform {
|
|
|
2268
2168
|
accessory.context.device = device;
|
|
2269
2169
|
accessory.context.model = device.remoteType;
|
|
2270
2170
|
accessory.context.deviceID = device.deviceId;
|
|
2271
|
-
|
|
2272
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
2273
|
-
}
|
|
2171
|
+
accessory.context.FirmwareRevision = device.version;
|
|
2274
2172
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2275
2173
|
accessory.context.connectionType = device.connectionType;
|
|
2276
2174
|
// create the accessory handler for the newly create accessory
|
|
@@ -2297,9 +2195,7 @@ export class SwitchBotPlatform {
|
|
|
2297
2195
|
existingAccessory.context.model = device.remoteType;
|
|
2298
2196
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2299
2197
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2300
|
-
|
|
2301
|
-
existingAccessory.context.FirmwareRevision = device.firmware;
|
|
2302
|
-
}
|
|
2198
|
+
existingAccessory.context.FirmwareRevision = device.version;
|
|
2303
2199
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2304
2200
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
2305
2201
|
existingAccessory.context.connectionType = device.connectionType;
|
|
@@ -2325,9 +2221,7 @@ export class SwitchBotPlatform {
|
|
|
2325
2221
|
accessory.context.device = device;
|
|
2326
2222
|
accessory.context.model = device.remoteType;
|
|
2327
2223
|
accessory.context.deviceID = device.deviceId;
|
|
2328
|
-
|
|
2329
|
-
accessory.context.FirmwareRevision = device.firmware;
|
|
2330
|
-
}
|
|
2224
|
+
accessory.context.FirmwareRevision = device.version;
|
|
2331
2225
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2332
2226
|
accessory.context.connectionType = device.connectionType;
|
|
2333
2227
|
// create the accessory handler for the newly create accessory
|