@switchbot/homebridge-switchbot 3.5.0-beta.39 → 3.5.0-beta.40
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/blindtilt.js +3 -3
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.js +3 -3
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.js +3 -3
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.js +3 -3
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.js +3 -3
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.js +3 -3
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/device.js +8 -5
- package/dist/device/device.js.map +1 -1
- package/dist/device/fan.js +6 -6
- package/dist/device/fan.js.map +1 -1
- package/dist/device/hub.js +3 -3
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.js +3 -3
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.js +3 -3
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.js +3 -3
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.js +3 -3
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.js +3 -3
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.js +3 -3
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.js +3 -3
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.js +3 -3
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.js +3 -3
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.js +3 -3
- package/dist/device/waterdetector.js.map +1 -1
- package/dist/homebridge-ui/public/index.html +2 -2
- package/dist/irdevice/irdevice.js +6 -6
- package/dist/irdevice/irdevice.js.map +1 -1
- package/dist/platform.js +55 -55
- package/dist/platform.js.map +1 -1
- package/package.json +1 -1
- package/src/device/blindtilt.ts +3 -3
- package/src/device/bot.ts +3 -3
- package/src/device/ceilinglight.ts +3 -3
- package/src/device/colorbulb.ts +3 -3
- package/src/device/contact.ts +3 -3
- package/src/device/curtain.ts +3 -3
- package/src/device/device.ts +8 -5
- package/src/device/fan.ts +6 -6
- package/src/device/hub.ts +3 -3
- package/src/device/humidifier.ts +3 -3
- package/src/device/iosensor.ts +3 -3
- package/src/device/lightstrip.ts +3 -3
- package/src/device/lock.ts +3 -3
- package/src/device/meter.ts +3 -3
- package/src/device/meterplus.ts +3 -3
- package/src/device/motion.ts +3 -3
- package/src/device/plug.ts +3 -3
- package/src/device/robotvacuumcleaner.ts +3 -3
- package/src/device/waterdetector.ts +3 -3
- package/src/homebridge-ui/public/index.html +2 -2
- package/src/irdevice/irdevice.ts +6 -6
- package/src/platform.ts +55 -55
package/src/platform.ts
CHANGED
|
@@ -846,7 +846,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
846
846
|
existingAccessory.context.deviceID = device.deviceId;
|
|
847
847
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
848
848
|
if (device.version && !device.firmware) {
|
|
849
|
-
existingAccessory.context.
|
|
849
|
+
existingAccessory.context.version = device.version;
|
|
850
850
|
}
|
|
851
851
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
852
852
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -874,7 +874,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
874
874
|
accessory.context.model = device.deviceType;
|
|
875
875
|
accessory.context.deviceID = device.deviceId;
|
|
876
876
|
if (device.version && !device.firmware) {
|
|
877
|
-
accessory.context.
|
|
877
|
+
accessory.context.version = device.version;
|
|
878
878
|
}
|
|
879
879
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
880
880
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -906,7 +906,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
906
906
|
existingAccessory.context.deviceID = device.deviceId;
|
|
907
907
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
908
908
|
if (device.version && !device.firmware) {
|
|
909
|
-
existingAccessory.context.
|
|
909
|
+
existingAccessory.context.version = device.version;
|
|
910
910
|
}
|
|
911
911
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
912
912
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -934,11 +934,11 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
934
934
|
accessory.context.model = device.deviceType;
|
|
935
935
|
accessory.context.deviceID = device.deviceId;
|
|
936
936
|
if (device.version && !device.firmware) {
|
|
937
|
-
accessory.context.
|
|
937
|
+
accessory.context.version = device.version;
|
|
938
938
|
}
|
|
939
939
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
940
940
|
accessory.context.connectionType = await this.connectionType(device);
|
|
941
|
-
// accessory.context.
|
|
941
|
+
// accessory.context.version = findaccessories.accessoryAttribute.softwareRevision;
|
|
942
942
|
// create the accessory handler for the newly create accessory
|
|
943
943
|
// this is imported from `platformAccessory.ts`
|
|
944
944
|
new Bot(this, accessory, device);
|
|
@@ -967,7 +967,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
967
967
|
existingAccessory.context.deviceID = device.deviceId;
|
|
968
968
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
969
969
|
if (device.version && !device.firmware) {
|
|
970
|
-
existingAccessory.context.
|
|
970
|
+
existingAccessory.context.version = device.version;
|
|
971
971
|
}
|
|
972
972
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
973
973
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -995,7 +995,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
995
995
|
accessory.context.model = device.deviceType;
|
|
996
996
|
accessory.context.deviceID = device.deviceId;
|
|
997
997
|
if (device.version && !device.firmware) {
|
|
998
|
-
accessory.context.
|
|
998
|
+
accessory.context.version = device.version;
|
|
999
999
|
}
|
|
1000
1000
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1001
1001
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1028,7 +1028,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1028
1028
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1029
1029
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1030
1030
|
if (device.version && !device.firmware) {
|
|
1031
|
-
existingAccessory.context.
|
|
1031
|
+
existingAccessory.context.version = device.version;
|
|
1032
1032
|
}
|
|
1033
1033
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1034
1034
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1056,7 +1056,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1056
1056
|
accessory.context.model = device.deviceType;
|
|
1057
1057
|
accessory.context.deviceID = device.deviceId;
|
|
1058
1058
|
if (device.version && !device.firmware) {
|
|
1059
|
-
accessory.context.
|
|
1059
|
+
accessory.context.version = device.version;
|
|
1060
1060
|
}
|
|
1061
1061
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1062
1062
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1089,7 +1089,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1089
1089
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1090
1090
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1091
1091
|
if (device.version && !device.firmware) {
|
|
1092
|
-
existingAccessory.context.
|
|
1092
|
+
existingAccessory.context.version = device.version;
|
|
1093
1093
|
}
|
|
1094
1094
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1095
1095
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1117,7 +1117,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1117
1117
|
accessory.context.model = device.deviceType;
|
|
1118
1118
|
accessory.context.deviceID = device.deviceId;
|
|
1119
1119
|
if (device.version && !device.firmware) {
|
|
1120
|
-
accessory.context.
|
|
1120
|
+
accessory.context.version = device.version;
|
|
1121
1121
|
}
|
|
1122
1122
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1123
1123
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1149,7 +1149,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1149
1149
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1150
1150
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1151
1151
|
if (device.version && !device.firmware) {
|
|
1152
|
-
existingAccessory.context.
|
|
1152
|
+
existingAccessory.context.version = device.version;
|
|
1153
1153
|
}
|
|
1154
1154
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1155
1155
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1177,7 +1177,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1177
1177
|
accessory.context.model = device.deviceType;
|
|
1178
1178
|
accessory.context.deviceID = device.deviceId;
|
|
1179
1179
|
if (device.version && !device.firmware) {
|
|
1180
|
-
accessory.context.
|
|
1180
|
+
accessory.context.version = device.version;
|
|
1181
1181
|
}
|
|
1182
1182
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1183
1183
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1209,7 +1209,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1209
1209
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1210
1210
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1211
1211
|
if (device.version && !device.firmware) {
|
|
1212
|
-
existingAccessory.context.
|
|
1212
|
+
existingAccessory.context.version = device.version;
|
|
1213
1213
|
}
|
|
1214
1214
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1215
1215
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1237,7 +1237,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1237
1237
|
accessory.context.model = device.deviceType;
|
|
1238
1238
|
accessory.context.deviceID = device.deviceId;
|
|
1239
1239
|
if (device.version && !device.firmware) {
|
|
1240
|
-
accessory.context.
|
|
1240
|
+
accessory.context.version = device.version;
|
|
1241
1241
|
}
|
|
1242
1242
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1243
1243
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1269,7 +1269,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1269
1269
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1270
1270
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1271
1271
|
if (device.version && !device.firmware) {
|
|
1272
|
-
existingAccessory.context.
|
|
1272
|
+
existingAccessory.context.version = device.version;
|
|
1273
1273
|
}
|
|
1274
1274
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1275
1275
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1297,7 +1297,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1297
1297
|
accessory.context.model = device.deviceType;
|
|
1298
1298
|
accessory.context.deviceID = device.deviceId;
|
|
1299
1299
|
if (device.version && !device.firmware) {
|
|
1300
|
-
accessory.context.
|
|
1300
|
+
accessory.context.version = device.version;
|
|
1301
1301
|
}
|
|
1302
1302
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1303
1303
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1329,7 +1329,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1329
1329
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1330
1330
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1331
1331
|
if (device.version && !device.firmware) {
|
|
1332
|
-
existingAccessory.context.
|
|
1332
|
+
existingAccessory.context.version = device.version;
|
|
1333
1333
|
}
|
|
1334
1334
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1335
1335
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1357,7 +1357,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1357
1357
|
accessory.context.model = device.deviceType;
|
|
1358
1358
|
accessory.context.deviceID = device.deviceId;
|
|
1359
1359
|
if (device.version && !device.firmware) {
|
|
1360
|
-
accessory.context.
|
|
1360
|
+
accessory.context.version = device.version;
|
|
1361
1361
|
}
|
|
1362
1362
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1363
1363
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1389,7 +1389,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1389
1389
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1390
1390
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1391
1391
|
if (device.version && !device.firmware) {
|
|
1392
|
-
existingAccessory.context.
|
|
1392
|
+
existingAccessory.context.version = device.version;
|
|
1393
1393
|
}
|
|
1394
1394
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1395
1395
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1430,7 +1430,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1430
1430
|
accessory.context.model = device.deviceType;
|
|
1431
1431
|
accessory.context.deviceID = device.deviceId;
|
|
1432
1432
|
if (device.version && !device.firmware) {
|
|
1433
|
-
accessory.context.
|
|
1433
|
+
accessory.context.version = device.version;
|
|
1434
1434
|
}
|
|
1435
1435
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1436
1436
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1462,7 +1462,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1462
1462
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1463
1463
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1464
1464
|
if (device.version && !device.firmware) {
|
|
1465
|
-
existingAccessory.context.
|
|
1465
|
+
existingAccessory.context.version = device.version;
|
|
1466
1466
|
}
|
|
1467
1467
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1468
1468
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1503,7 +1503,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1503
1503
|
accessory.context.model = device.deviceType;
|
|
1504
1504
|
accessory.context.deviceID = device.deviceId;
|
|
1505
1505
|
if (device.version && !device.firmware) {
|
|
1506
|
-
accessory.context.
|
|
1506
|
+
accessory.context.version = device.version;
|
|
1507
1507
|
}
|
|
1508
1508
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1509
1509
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1535,7 +1535,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1535
1535
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1536
1536
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1537
1537
|
if (device.version && !device.firmware) {
|
|
1538
|
-
existingAccessory.context.
|
|
1538
|
+
existingAccessory.context.version = device.version;
|
|
1539
1539
|
}
|
|
1540
1540
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1541
1541
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1563,7 +1563,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1563
1563
|
accessory.context.model = device.deviceType;
|
|
1564
1564
|
accessory.context.deviceID = device.deviceId;
|
|
1565
1565
|
if (device.version && !device.firmware) {
|
|
1566
|
-
accessory.context.
|
|
1566
|
+
accessory.context.version = device.version;
|
|
1567
1567
|
}
|
|
1568
1568
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1569
1569
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1595,7 +1595,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1595
1595
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1596
1596
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1597
1597
|
if (device.version && !device.firmware) {
|
|
1598
|
-
existingAccessory.context.
|
|
1598
|
+
existingAccessory.context.version = device.version;
|
|
1599
1599
|
}
|
|
1600
1600
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1601
1601
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1623,7 +1623,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1623
1623
|
accessory.context.model = device.deviceType;
|
|
1624
1624
|
accessory.context.deviceID = device.deviceId;
|
|
1625
1625
|
if (device.version && !device.firmware) {
|
|
1626
|
-
accessory.context.
|
|
1626
|
+
accessory.context.version = device.version;
|
|
1627
1627
|
}
|
|
1628
1628
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1629
1629
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1655,7 +1655,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1655
1655
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1656
1656
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1657
1657
|
if (device.version && !device.firmware) {
|
|
1658
|
-
existingAccessory.context.
|
|
1658
|
+
existingAccessory.context.version = device.version;
|
|
1659
1659
|
}
|
|
1660
1660
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1661
1661
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1683,7 +1683,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1683
1683
|
accessory.context.model = device.deviceType;
|
|
1684
1684
|
accessory.context.deviceID = device.deviceId;
|
|
1685
1685
|
if (device.version && !device.firmware) {
|
|
1686
|
-
accessory.context.
|
|
1686
|
+
accessory.context.version = device.version;
|
|
1687
1687
|
}
|
|
1688
1688
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1689
1689
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1715,7 +1715,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1715
1715
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1716
1716
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1717
1717
|
if (device.version && !device.firmware) {
|
|
1718
|
-
existingAccessory.context.
|
|
1718
|
+
existingAccessory.context.version = device.version;
|
|
1719
1719
|
}
|
|
1720
1720
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1721
1721
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1743,7 +1743,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1743
1743
|
accessory.context.model = device.deviceType;
|
|
1744
1744
|
accessory.context.deviceID = device.deviceId;
|
|
1745
1745
|
if (device.version && !device.firmware) {
|
|
1746
|
-
accessory.context.
|
|
1746
|
+
accessory.context.version = device.version;
|
|
1747
1747
|
}
|
|
1748
1748
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1749
1749
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1775,7 +1775,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1775
1775
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1776
1776
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1777
1777
|
if (device.version && !device.firmware) {
|
|
1778
|
-
existingAccessory.context.
|
|
1778
|
+
existingAccessory.context.version = device.version;
|
|
1779
1779
|
}
|
|
1780
1780
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1781
1781
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1803,7 +1803,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1803
1803
|
accessory.context.model = device.deviceType;
|
|
1804
1804
|
accessory.context.deviceID = device.deviceId;
|
|
1805
1805
|
if (device.version && !device.firmware) {
|
|
1806
|
-
accessory.context.
|
|
1806
|
+
accessory.context.version = device.version;
|
|
1807
1807
|
}
|
|
1808
1808
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1809
1809
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1835,7 +1835,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1835
1835
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1836
1836
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1837
1837
|
if (device.version && !device.firmware) {
|
|
1838
|
-
existingAccessory.context.
|
|
1838
|
+
existingAccessory.context.version = device.version;
|
|
1839
1839
|
}
|
|
1840
1840
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1841
1841
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1863,7 +1863,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1863
1863
|
accessory.context.model = device.deviceType;
|
|
1864
1864
|
accessory.context.deviceID = device.deviceId;
|
|
1865
1865
|
if (device.version && !device.firmware) {
|
|
1866
|
-
accessory.context.
|
|
1866
|
+
accessory.context.version = device.version;
|
|
1867
1867
|
}
|
|
1868
1868
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1869
1869
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1895,7 +1895,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1895
1895
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1896
1896
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1897
1897
|
if (device.version && !device.firmware) {
|
|
1898
|
-
existingAccessory.context.
|
|
1898
|
+
existingAccessory.context.version = device.version;
|
|
1899
1899
|
}
|
|
1900
1900
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1901
1901
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1923,7 +1923,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1923
1923
|
accessory.context.model = device.deviceType;
|
|
1924
1924
|
accessory.context.deviceID = device.deviceId;
|
|
1925
1925
|
if (device.version && !device.firmware) {
|
|
1926
|
-
accessory.context.
|
|
1926
|
+
accessory.context.version = device.version;
|
|
1927
1927
|
}
|
|
1928
1928
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1929
1929
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1953,7 +1953,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1953
1953
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1954
1954
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1955
1955
|
if (device.version && !device.firmware) {
|
|
1956
|
-
existingAccessory.context.
|
|
1956
|
+
existingAccessory.context.version = device.version;
|
|
1957
1957
|
}
|
|
1958
1958
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1959
1959
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1978,7 +1978,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1978
1978
|
accessory.context.model = device.remoteType;
|
|
1979
1979
|
accessory.context.deviceID = device.deviceId;
|
|
1980
1980
|
if (device.version && !device.firmware) {
|
|
1981
|
-
accessory.context.
|
|
1981
|
+
accessory.context.version = device.version;
|
|
1982
1982
|
}
|
|
1983
1983
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1984
1984
|
accessory.context.connectionType = device.connectionType;
|
|
@@ -2009,7 +2009,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
2009
2009
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2010
2010
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2011
2011
|
if (device.version && !device.firmware) {
|
|
2012
|
-
existingAccessory.context.
|
|
2012
|
+
existingAccessory.context.version = device.version;
|
|
2013
2013
|
}
|
|
2014
2014
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2015
2015
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -2037,7 +2037,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
2037
2037
|
accessory.context.model = device.remoteType;
|
|
2038
2038
|
accessory.context.deviceID = device.deviceId;
|
|
2039
2039
|
if (device.version && !device.firmware) {
|
|
2040
|
-
accessory.context.
|
|
2040
|
+
accessory.context.version = device.version;
|
|
2041
2041
|
}
|
|
2042
2042
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2043
2043
|
accessory.context.connectionType = device.connectionType;
|
|
@@ -2069,7 +2069,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
2069
2069
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2070
2070
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2071
2071
|
if (device.version && !device.firmware) {
|
|
2072
|
-
existingAccessory.context.
|
|
2072
|
+
existingAccessory.context.version = device.version;
|
|
2073
2073
|
}
|
|
2074
2074
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2075
2075
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -2097,7 +2097,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
2097
2097
|
accessory.context.model = device.remoteType;
|
|
2098
2098
|
accessory.context.deviceID = device.deviceId;
|
|
2099
2099
|
if (device.version && !device.firmware) {
|
|
2100
|
-
accessory.context.
|
|
2100
|
+
accessory.context.version = device.version;
|
|
2101
2101
|
}
|
|
2102
2102
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2103
2103
|
accessory.context.connectionType = device.connectionType;
|
|
@@ -2129,7 +2129,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
2129
2129
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2130
2130
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2131
2131
|
if (device.version && !device.firmware) {
|
|
2132
|
-
existingAccessory.context.
|
|
2132
|
+
existingAccessory.context.version = device.version;
|
|
2133
2133
|
}
|
|
2134
2134
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2135
2135
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -2157,7 +2157,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
2157
2157
|
accessory.context.model = device.remoteType;
|
|
2158
2158
|
accessory.context.deviceID = device.deviceId;
|
|
2159
2159
|
if (device.version && !device.firmware) {
|
|
2160
|
-
accessory.context.
|
|
2160
|
+
accessory.context.version = device.version;
|
|
2161
2161
|
}
|
|
2162
2162
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2163
2163
|
accessory.context.connectionType = device.connectionType;
|
|
@@ -2189,7 +2189,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
2189
2189
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2190
2190
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2191
2191
|
if (device.version && !device.firmware) {
|
|
2192
|
-
existingAccessory.context.
|
|
2192
|
+
existingAccessory.context.version = device.version;
|
|
2193
2193
|
}
|
|
2194
2194
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2195
2195
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -2217,7 +2217,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
2217
2217
|
accessory.context.model = device.remoteType;
|
|
2218
2218
|
accessory.context.deviceID = device.deviceId;
|
|
2219
2219
|
if (device.version && !device.firmware) {
|
|
2220
|
-
accessory.context.
|
|
2220
|
+
accessory.context.version = device.version;
|
|
2221
2221
|
}
|
|
2222
2222
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2223
2223
|
accessory.context.connectionType = device.connectionType;
|
|
@@ -2249,7 +2249,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
2249
2249
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2250
2250
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2251
2251
|
if (device.version && !device.firmware) {
|
|
2252
|
-
existingAccessory.context.
|
|
2252
|
+
existingAccessory.context.version = device.version;
|
|
2253
2253
|
}
|
|
2254
2254
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2255
2255
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -2277,7 +2277,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
2277
2277
|
accessory.context.model = device.remoteType;
|
|
2278
2278
|
accessory.context.deviceID = device.deviceId;
|
|
2279
2279
|
if (device.version && !device.firmware) {
|
|
2280
|
-
accessory.context.
|
|
2280
|
+
accessory.context.version = device.version;
|
|
2281
2281
|
}
|
|
2282
2282
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2283
2283
|
accessory.context.connectionType = device.connectionType;
|
|
@@ -2309,7 +2309,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
2309
2309
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2310
2310
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2311
2311
|
if (device.version && !device.firmware) {
|
|
2312
|
-
existingAccessory.context.
|
|
2312
|
+
existingAccessory.context.version = device.version;
|
|
2313
2313
|
}
|
|
2314
2314
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2315
2315
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -2337,7 +2337,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
2337
2337
|
accessory.context.model = device.remoteType;
|
|
2338
2338
|
accessory.context.deviceID = device.deviceId;
|
|
2339
2339
|
if (device.version && !device.firmware) {
|
|
2340
|
-
accessory.context.
|
|
2340
|
+
accessory.context.version = device.version;
|
|
2341
2341
|
}
|
|
2342
2342
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2343
2343
|
accessory.context.connectionType = device.connectionType;
|
|
@@ -2369,7 +2369,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
2369
2369
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2370
2370
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2371
2371
|
if (device.version && !device.firmware) {
|
|
2372
|
-
existingAccessory.context.
|
|
2372
|
+
existingAccessory.context.version = device.version;
|
|
2373
2373
|
}
|
|
2374
2374
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2375
2375
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -2397,7 +2397,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
2397
2397
|
accessory.context.model = device.remoteType;
|
|
2398
2398
|
accessory.context.deviceID = device.deviceId;
|
|
2399
2399
|
if (device.version && !device.firmware) {
|
|
2400
|
-
accessory.context.
|
|
2400
|
+
accessory.context.version = device.version;
|
|
2401
2401
|
}
|
|
2402
2402
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2403
2403
|
accessory.context.connectionType = device.connectionType;
|
|
@@ -2429,7 +2429,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
2429
2429
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2430
2430
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2431
2431
|
if (device.version && !device.firmware) {
|
|
2432
|
-
existingAccessory.context.
|
|
2432
|
+
existingAccessory.context.version = device.version;
|
|
2433
2433
|
}
|
|
2434
2434
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2435
2435
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -2457,7 +2457,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
2457
2457
|
accessory.context.model = device.remoteType;
|
|
2458
2458
|
accessory.context.deviceID = device.deviceId;
|
|
2459
2459
|
if (device.version && !device.firmware) {
|
|
2460
|
-
accessory.context.
|
|
2460
|
+
accessory.context.version = device.version;
|
|
2461
2461
|
}
|
|
2462
2462
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2463
2463
|
accessory.context.connectionType = device.connectionType;
|