@switchbot/homebridge-switchbot 3.5.0-beta.43 → 3.5.0-beta.45
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 +1 -1
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.js +1 -1
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.js +1 -1
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.js +1 -1
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.js +1 -1
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.js +1 -1
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/device.js +12 -7
- package/dist/device/device.js.map +1 -1
- package/dist/device/fan.js +1 -1
- package/dist/device/fan.js.map +1 -1
- package/dist/device/hub.js +1 -1
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +13 -14
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.js +1 -1
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.js +1 -1
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.js +1 -1
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.js +1 -1
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.js +1 -1
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.js +1 -1
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.js +1 -1
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.js +1 -1
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.js +1 -1
- package/dist/device/waterdetector.js.map +1 -1
- package/dist/platform.js +54 -54
- package/dist/platform.js.map +1 -1
- package/package.json +1 -1
- package/src/device/blindtilt.ts +1 -1
- package/src/device/bot.ts +1 -1
- package/src/device/ceilinglight.ts +1 -1
- package/src/device/colorbulb.ts +1 -1
- package/src/device/contact.ts +1 -1
- package/src/device/curtain.ts +1 -1
- package/src/device/device.ts +12 -7
- package/src/device/fan.ts +1 -1
- package/src/device/hub.ts +1 -1
- package/src/device/humidifier.ts +11 -12
- package/src/device/iosensor.ts +1 -1
- package/src/device/lightstrip.ts +1 -1
- package/src/device/lock.ts +1 -1
- package/src/device/meter.ts +1 -1
- package/src/device/meterplus.ts +1 -1
- package/src/device/motion.ts +1 -1
- package/src/device/plug.ts +1 -1
- package/src/device/robotvacuumcleaner.ts +1 -1
- package/src/device/waterdetector.ts +1 -1
- package/src/platform.ts +54 -54
package/dist/platform.js
CHANGED
|
@@ -798,7 +798,7 @@ export class SwitchBotPlatform {
|
|
|
798
798
|
existingAccessory.context.deviceID = device.deviceId;
|
|
799
799
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
800
800
|
if (device.version && !device.firmware) {
|
|
801
|
-
existingAccessory.context.version = device.version;
|
|
801
|
+
existingAccessory.context.version = device.version.toString();
|
|
802
802
|
}
|
|
803
803
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
804
804
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -826,7 +826,7 @@ export class SwitchBotPlatform {
|
|
|
826
826
|
accessory.context.model = device.deviceType;
|
|
827
827
|
accessory.context.deviceID = device.deviceId;
|
|
828
828
|
if (device.version && !device.firmware) {
|
|
829
|
-
accessory.context.version = device.version;
|
|
829
|
+
accessory.context.version = device.version.toString();
|
|
830
830
|
}
|
|
831
831
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
832
832
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -855,7 +855,7 @@ export class SwitchBotPlatform {
|
|
|
855
855
|
existingAccessory.context.deviceID = device.deviceId;
|
|
856
856
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
857
857
|
if (device.version && !device.firmware) {
|
|
858
|
-
existingAccessory.context.version = device.version;
|
|
858
|
+
existingAccessory.context.version = device.version.toString();
|
|
859
859
|
}
|
|
860
860
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
861
861
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -883,7 +883,7 @@ export class SwitchBotPlatform {
|
|
|
883
883
|
accessory.context.model = device.deviceType;
|
|
884
884
|
accessory.context.deviceID = device.deviceId;
|
|
885
885
|
if (device.version && !device.firmware) {
|
|
886
|
-
accessory.context.version = device.version;
|
|
886
|
+
accessory.context.version = device.version.toString();
|
|
887
887
|
}
|
|
888
888
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
889
889
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -913,7 +913,7 @@ export class SwitchBotPlatform {
|
|
|
913
913
|
existingAccessory.context.deviceID = device.deviceId;
|
|
914
914
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
915
915
|
if (device.version && !device.firmware) {
|
|
916
|
-
existingAccessory.context.version = device.version;
|
|
916
|
+
existingAccessory.context.version = device.version.toString();
|
|
917
917
|
}
|
|
918
918
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
919
919
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -941,7 +941,7 @@ export class SwitchBotPlatform {
|
|
|
941
941
|
accessory.context.model = device.deviceType;
|
|
942
942
|
accessory.context.deviceID = device.deviceId;
|
|
943
943
|
if (device.version && !device.firmware) {
|
|
944
|
-
accessory.context.version = device.version;
|
|
944
|
+
accessory.context.version = device.version.toString();
|
|
945
945
|
}
|
|
946
946
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
947
947
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -971,7 +971,7 @@ export class SwitchBotPlatform {
|
|
|
971
971
|
existingAccessory.context.deviceID = device.deviceId;
|
|
972
972
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
973
973
|
if (device.version && !device.firmware) {
|
|
974
|
-
existingAccessory.context.version = device.version;
|
|
974
|
+
existingAccessory.context.version = device.version.toString();
|
|
975
975
|
}
|
|
976
976
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
977
977
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -999,7 +999,7 @@ export class SwitchBotPlatform {
|
|
|
999
999
|
accessory.context.model = device.deviceType;
|
|
1000
1000
|
accessory.context.deviceID = device.deviceId;
|
|
1001
1001
|
if (device.version && !device.firmware) {
|
|
1002
|
-
accessory.context.version = device.version;
|
|
1002
|
+
accessory.context.version = device.version.toString();
|
|
1003
1003
|
}
|
|
1004
1004
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1005
1005
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1029,7 +1029,7 @@ export class SwitchBotPlatform {
|
|
|
1029
1029
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1030
1030
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1031
1031
|
if (device.version && !device.firmware) {
|
|
1032
|
-
existingAccessory.context.version = device.version;
|
|
1032
|
+
existingAccessory.context.version = device.version.toString();
|
|
1033
1033
|
}
|
|
1034
1034
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1035
1035
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1057,7 +1057,7 @@ export class SwitchBotPlatform {
|
|
|
1057
1057
|
accessory.context.model = device.deviceType;
|
|
1058
1058
|
accessory.context.deviceID = device.deviceId;
|
|
1059
1059
|
if (device.version && !device.firmware) {
|
|
1060
|
-
accessory.context.version = device.version;
|
|
1060
|
+
accessory.context.version = device.version.toString();
|
|
1061
1061
|
}
|
|
1062
1062
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1063
1063
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1086,7 +1086,7 @@ export class SwitchBotPlatform {
|
|
|
1086
1086
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1087
1087
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1088
1088
|
if (device.version && !device.firmware) {
|
|
1089
|
-
existingAccessory.context.version = device.version;
|
|
1089
|
+
existingAccessory.context.version = device.version.toString();
|
|
1090
1090
|
}
|
|
1091
1091
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1092
1092
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1114,7 +1114,7 @@ export class SwitchBotPlatform {
|
|
|
1114
1114
|
accessory.context.model = device.deviceType;
|
|
1115
1115
|
accessory.context.deviceID = device.deviceId;
|
|
1116
1116
|
if (device.version && !device.firmware) {
|
|
1117
|
-
accessory.context.version = device.version;
|
|
1117
|
+
accessory.context.version = device.version.toString();
|
|
1118
1118
|
}
|
|
1119
1119
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1120
1120
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1143,7 +1143,7 @@ export class SwitchBotPlatform {
|
|
|
1143
1143
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1144
1144
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1145
1145
|
if (device.version && !device.firmware) {
|
|
1146
|
-
existingAccessory.context.version = device.version;
|
|
1146
|
+
existingAccessory.context.version = device.version.toString();
|
|
1147
1147
|
}
|
|
1148
1148
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1149
1149
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1171,7 +1171,7 @@ export class SwitchBotPlatform {
|
|
|
1171
1171
|
accessory.context.model = device.deviceType;
|
|
1172
1172
|
accessory.context.deviceID = device.deviceId;
|
|
1173
1173
|
if (device.version && !device.firmware) {
|
|
1174
|
-
accessory.context.version = device.version;
|
|
1174
|
+
accessory.context.version = device.version.toString();
|
|
1175
1175
|
}
|
|
1176
1176
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1177
1177
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1200,7 +1200,7 @@ export class SwitchBotPlatform {
|
|
|
1200
1200
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1201
1201
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1202
1202
|
if (device.version && !device.firmware) {
|
|
1203
|
-
existingAccessory.context.version = device.version;
|
|
1203
|
+
existingAccessory.context.version = device.version.toString();
|
|
1204
1204
|
}
|
|
1205
1205
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1206
1206
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1228,7 +1228,7 @@ export class SwitchBotPlatform {
|
|
|
1228
1228
|
accessory.context.model = device.deviceType;
|
|
1229
1229
|
accessory.context.deviceID = device.deviceId;
|
|
1230
1230
|
if (device.version && !device.firmware) {
|
|
1231
|
-
accessory.context.version = device.version;
|
|
1231
|
+
accessory.context.version = device.version.toString();
|
|
1232
1232
|
}
|
|
1233
1233
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1234
1234
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1257,7 +1257,7 @@ export class SwitchBotPlatform {
|
|
|
1257
1257
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1258
1258
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1259
1259
|
if (device.version && !device.firmware) {
|
|
1260
|
-
existingAccessory.context.version = device.version;
|
|
1260
|
+
existingAccessory.context.version = device.version.toString();
|
|
1261
1261
|
}
|
|
1262
1262
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1263
1263
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1285,7 +1285,7 @@ export class SwitchBotPlatform {
|
|
|
1285
1285
|
accessory.context.model = device.deviceType;
|
|
1286
1286
|
accessory.context.deviceID = device.deviceId;
|
|
1287
1287
|
if (device.version && !device.firmware) {
|
|
1288
|
-
accessory.context.version = device.version;
|
|
1288
|
+
accessory.context.version = device.version.toString();
|
|
1289
1289
|
}
|
|
1290
1290
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1291
1291
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1314,7 +1314,7 @@ export class SwitchBotPlatform {
|
|
|
1314
1314
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1315
1315
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1316
1316
|
if (device.version && !device.firmware) {
|
|
1317
|
-
existingAccessory.context.version = device.version;
|
|
1317
|
+
existingAccessory.context.version = device.version.toString();
|
|
1318
1318
|
}
|
|
1319
1319
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1320
1320
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1354,7 +1354,7 @@ export class SwitchBotPlatform {
|
|
|
1354
1354
|
accessory.context.model = device.deviceType;
|
|
1355
1355
|
accessory.context.deviceID = device.deviceId;
|
|
1356
1356
|
if (device.version && !device.firmware) {
|
|
1357
|
-
accessory.context.version = device.version;
|
|
1357
|
+
accessory.context.version = device.version.toString();
|
|
1358
1358
|
}
|
|
1359
1359
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1360
1360
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1383,7 +1383,7 @@ export class SwitchBotPlatform {
|
|
|
1383
1383
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1384
1384
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1385
1385
|
if (device.version && !device.firmware) {
|
|
1386
|
-
existingAccessory.context.version = device.version;
|
|
1386
|
+
existingAccessory.context.version = device.version.toString();
|
|
1387
1387
|
}
|
|
1388
1388
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1389
1389
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1423,7 +1423,7 @@ export class SwitchBotPlatform {
|
|
|
1423
1423
|
accessory.context.model = device.deviceType;
|
|
1424
1424
|
accessory.context.deviceID = device.deviceId;
|
|
1425
1425
|
if (device.version && !device.firmware) {
|
|
1426
|
-
accessory.context.version = device.version;
|
|
1426
|
+
accessory.context.version = device.version.toString();
|
|
1427
1427
|
}
|
|
1428
1428
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1429
1429
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1452,7 +1452,7 @@ export class SwitchBotPlatform {
|
|
|
1452
1452
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1453
1453
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1454
1454
|
if (device.version && !device.firmware) {
|
|
1455
|
-
existingAccessory.context.version = device.version;
|
|
1455
|
+
existingAccessory.context.version = device.version.toString();
|
|
1456
1456
|
}
|
|
1457
1457
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1458
1458
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1480,7 +1480,7 @@ export class SwitchBotPlatform {
|
|
|
1480
1480
|
accessory.context.model = device.deviceType;
|
|
1481
1481
|
accessory.context.deviceID = device.deviceId;
|
|
1482
1482
|
if (device.version && !device.firmware) {
|
|
1483
|
-
accessory.context.version = device.version;
|
|
1483
|
+
accessory.context.version = device.version.toString();
|
|
1484
1484
|
}
|
|
1485
1485
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1486
1486
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1509,7 +1509,7 @@ export class SwitchBotPlatform {
|
|
|
1509
1509
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1510
1510
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1511
1511
|
if (device.version && !device.firmware) {
|
|
1512
|
-
existingAccessory.context.version = device.version;
|
|
1512
|
+
existingAccessory.context.version = device.version.toString();
|
|
1513
1513
|
}
|
|
1514
1514
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1515
1515
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1537,7 +1537,7 @@ export class SwitchBotPlatform {
|
|
|
1537
1537
|
accessory.context.model = device.deviceType;
|
|
1538
1538
|
accessory.context.deviceID = device.deviceId;
|
|
1539
1539
|
if (device.version && !device.firmware) {
|
|
1540
|
-
accessory.context.version = device.version;
|
|
1540
|
+
accessory.context.version = device.version.toString();
|
|
1541
1541
|
}
|
|
1542
1542
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1543
1543
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1567,7 +1567,7 @@ export class SwitchBotPlatform {
|
|
|
1567
1567
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1568
1568
|
this.warnLog(`${existingAccessory.displayName} version: ${device.version} firmware: ${device.firmware}`);
|
|
1569
1569
|
if (device.version && !device.firmware) {
|
|
1570
|
-
existingAccessory.context.version = device.version;
|
|
1570
|
+
existingAccessory.context.version = device.version.toString();
|
|
1571
1571
|
}
|
|
1572
1572
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1573
1573
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1595,7 +1595,7 @@ export class SwitchBotPlatform {
|
|
|
1595
1595
|
accessory.context.model = device.deviceType;
|
|
1596
1596
|
accessory.context.deviceID = device.deviceId;
|
|
1597
1597
|
if (device.version && !device.firmware) {
|
|
1598
|
-
accessory.context.version = device.version;
|
|
1598
|
+
accessory.context.version = device.version.toString();
|
|
1599
1599
|
}
|
|
1600
1600
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1601
1601
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1624,7 +1624,7 @@ export class SwitchBotPlatform {
|
|
|
1624
1624
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1625
1625
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1626
1626
|
if (device.version && !device.firmware) {
|
|
1627
|
-
existingAccessory.context.version = device.version;
|
|
1627
|
+
existingAccessory.context.version = device.version.toString();
|
|
1628
1628
|
}
|
|
1629
1629
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1630
1630
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1652,7 +1652,7 @@ export class SwitchBotPlatform {
|
|
|
1652
1652
|
accessory.context.model = device.deviceType;
|
|
1653
1653
|
accessory.context.deviceID = device.deviceId;
|
|
1654
1654
|
if (device.version && !device.firmware) {
|
|
1655
|
-
accessory.context.version = device.version;
|
|
1655
|
+
accessory.context.version = device.version.toString();
|
|
1656
1656
|
}
|
|
1657
1657
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1658
1658
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1681,7 +1681,7 @@ export class SwitchBotPlatform {
|
|
|
1681
1681
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1682
1682
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1683
1683
|
if (device.version && !device.firmware) {
|
|
1684
|
-
existingAccessory.context.version = device.version;
|
|
1684
|
+
existingAccessory.context.version = device.version.toString();
|
|
1685
1685
|
}
|
|
1686
1686
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1687
1687
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1709,7 +1709,7 @@ export class SwitchBotPlatform {
|
|
|
1709
1709
|
accessory.context.model = device.deviceType;
|
|
1710
1710
|
accessory.context.deviceID = device.deviceId;
|
|
1711
1711
|
if (device.version && !device.firmware) {
|
|
1712
|
-
accessory.context.version = device.version;
|
|
1712
|
+
accessory.context.version = device.version.toString();
|
|
1713
1713
|
}
|
|
1714
1714
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1715
1715
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1738,7 +1738,7 @@ export class SwitchBotPlatform {
|
|
|
1738
1738
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1739
1739
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1740
1740
|
if (device.version && !device.firmware) {
|
|
1741
|
-
existingAccessory.context.version = device.version;
|
|
1741
|
+
existingAccessory.context.version = device.version.toString();
|
|
1742
1742
|
}
|
|
1743
1743
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1744
1744
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1766,7 +1766,7 @@ export class SwitchBotPlatform {
|
|
|
1766
1766
|
accessory.context.model = device.deviceType;
|
|
1767
1767
|
accessory.context.deviceID = device.deviceId;
|
|
1768
1768
|
if (device.version && !device.firmware) {
|
|
1769
|
-
accessory.context.version = device.version;
|
|
1769
|
+
accessory.context.version = device.version.toString();
|
|
1770
1770
|
}
|
|
1771
1771
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1772
1772
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1795,7 +1795,7 @@ export class SwitchBotPlatform {
|
|
|
1795
1795
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1796
1796
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1797
1797
|
if (device.version && !device.firmware) {
|
|
1798
|
-
existingAccessory.context.version = device.version;
|
|
1798
|
+
existingAccessory.context.version = device.version.toString();
|
|
1799
1799
|
}
|
|
1800
1800
|
existingAccessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1801
1801
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1823,7 +1823,7 @@ export class SwitchBotPlatform {
|
|
|
1823
1823
|
accessory.context.model = device.deviceType;
|
|
1824
1824
|
accessory.context.deviceID = device.deviceId;
|
|
1825
1825
|
if (device.version && !device.firmware) {
|
|
1826
|
-
accessory.context.version = device.version;
|
|
1826
|
+
accessory.context.version = device.version.toString();
|
|
1827
1827
|
}
|
|
1828
1828
|
accessory.context.deviceType = `SwitchBot: ${device.deviceType}`;
|
|
1829
1829
|
accessory.context.connectionType = await this.connectionType(device);
|
|
@@ -1850,7 +1850,7 @@ export class SwitchBotPlatform {
|
|
|
1850
1850
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1851
1851
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1852
1852
|
if (device.version && !device.firmware) {
|
|
1853
|
-
existingAccessory.context.version = device.version;
|
|
1853
|
+
existingAccessory.context.version = device.version.toString();
|
|
1854
1854
|
}
|
|
1855
1855
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1856
1856
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1874,7 +1874,7 @@ export class SwitchBotPlatform {
|
|
|
1874
1874
|
accessory.context.model = device.remoteType;
|
|
1875
1875
|
accessory.context.deviceID = device.deviceId;
|
|
1876
1876
|
if (device.version && !device.firmware) {
|
|
1877
|
-
accessory.context.version = device.version;
|
|
1877
|
+
accessory.context.version = device.version.toString();
|
|
1878
1878
|
}
|
|
1879
1879
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1880
1880
|
accessory.context.connectionType = device.connectionType;
|
|
@@ -1902,7 +1902,7 @@ export class SwitchBotPlatform {
|
|
|
1902
1902
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1903
1903
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1904
1904
|
if (device.version && !device.firmware) {
|
|
1905
|
-
existingAccessory.context.version = device.version;
|
|
1905
|
+
existingAccessory.context.version = device.version.toString();
|
|
1906
1906
|
}
|
|
1907
1907
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1908
1908
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1930,7 +1930,7 @@ export class SwitchBotPlatform {
|
|
|
1930
1930
|
accessory.context.model = device.remoteType;
|
|
1931
1931
|
accessory.context.deviceID = device.deviceId;
|
|
1932
1932
|
if (device.version && !device.firmware) {
|
|
1933
|
-
accessory.context.version = device.version;
|
|
1933
|
+
accessory.context.version = device.version.toString();
|
|
1934
1934
|
}
|
|
1935
1935
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1936
1936
|
accessory.context.connectionType = device.connectionType;
|
|
@@ -1959,7 +1959,7 @@ export class SwitchBotPlatform {
|
|
|
1959
1959
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1960
1960
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1961
1961
|
if (device.version && !device.firmware) {
|
|
1962
|
-
existingAccessory.context.version = device.version;
|
|
1962
|
+
existingAccessory.context.version = device.version.toString();
|
|
1963
1963
|
}
|
|
1964
1964
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1965
1965
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -1987,7 +1987,7 @@ export class SwitchBotPlatform {
|
|
|
1987
1987
|
accessory.context.model = device.remoteType;
|
|
1988
1988
|
accessory.context.deviceID = device.deviceId;
|
|
1989
1989
|
if (device.version && !device.firmware) {
|
|
1990
|
-
accessory.context.version = device.version;
|
|
1990
|
+
accessory.context.version = device.version.toString();
|
|
1991
1991
|
}
|
|
1992
1992
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
1993
1993
|
accessory.context.connectionType = device.connectionType;
|
|
@@ -2016,7 +2016,7 @@ export class SwitchBotPlatform {
|
|
|
2016
2016
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2017
2017
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2018
2018
|
if (device.version && !device.firmware) {
|
|
2019
|
-
existingAccessory.context.version = device.version;
|
|
2019
|
+
existingAccessory.context.version = device.version.toString();
|
|
2020
2020
|
}
|
|
2021
2021
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2022
2022
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -2044,7 +2044,7 @@ export class SwitchBotPlatform {
|
|
|
2044
2044
|
accessory.context.model = device.remoteType;
|
|
2045
2045
|
accessory.context.deviceID = device.deviceId;
|
|
2046
2046
|
if (device.version && !device.firmware) {
|
|
2047
|
-
accessory.context.version = device.version;
|
|
2047
|
+
accessory.context.version = device.version.toString();
|
|
2048
2048
|
}
|
|
2049
2049
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2050
2050
|
accessory.context.connectionType = device.connectionType;
|
|
@@ -2073,7 +2073,7 @@ export class SwitchBotPlatform {
|
|
|
2073
2073
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2074
2074
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2075
2075
|
if (device.version && !device.firmware) {
|
|
2076
|
-
existingAccessory.context.version = device.version;
|
|
2076
|
+
existingAccessory.context.version = device.version.toString();
|
|
2077
2077
|
}
|
|
2078
2078
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2079
2079
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -2101,7 +2101,7 @@ export class SwitchBotPlatform {
|
|
|
2101
2101
|
accessory.context.model = device.remoteType;
|
|
2102
2102
|
accessory.context.deviceID = device.deviceId;
|
|
2103
2103
|
if (device.version && !device.firmware) {
|
|
2104
|
-
accessory.context.version = device.version;
|
|
2104
|
+
accessory.context.version = device.version.toString();
|
|
2105
2105
|
}
|
|
2106
2106
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2107
2107
|
accessory.context.connectionType = device.connectionType;
|
|
@@ -2130,7 +2130,7 @@ export class SwitchBotPlatform {
|
|
|
2130
2130
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2131
2131
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2132
2132
|
if (device.version && !device.firmware) {
|
|
2133
|
-
existingAccessory.context.version = device.version;
|
|
2133
|
+
existingAccessory.context.version = device.version.toString();
|
|
2134
2134
|
}
|
|
2135
2135
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2136
2136
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -2158,7 +2158,7 @@ export class SwitchBotPlatform {
|
|
|
2158
2158
|
accessory.context.model = device.remoteType;
|
|
2159
2159
|
accessory.context.deviceID = device.deviceId;
|
|
2160
2160
|
if (device.version && !device.firmware) {
|
|
2161
|
-
accessory.context.version = device.version;
|
|
2161
|
+
accessory.context.version = device.version.toString();
|
|
2162
2162
|
}
|
|
2163
2163
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2164
2164
|
accessory.context.connectionType = device.connectionType;
|
|
@@ -2187,7 +2187,7 @@ export class SwitchBotPlatform {
|
|
|
2187
2187
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2188
2188
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2189
2189
|
if (device.version && !device.firmware) {
|
|
2190
|
-
existingAccessory.context.version = device.version;
|
|
2190
|
+
existingAccessory.context.version = device.version.toString();
|
|
2191
2191
|
}
|
|
2192
2192
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2193
2193
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -2215,7 +2215,7 @@ export class SwitchBotPlatform {
|
|
|
2215
2215
|
accessory.context.model = device.remoteType;
|
|
2216
2216
|
accessory.context.deviceID = device.deviceId;
|
|
2217
2217
|
if (device.version && !device.firmware) {
|
|
2218
|
-
accessory.context.version = device.version;
|
|
2218
|
+
accessory.context.version = device.version.toString();
|
|
2219
2219
|
}
|
|
2220
2220
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2221
2221
|
accessory.context.connectionType = device.connectionType;
|
|
@@ -2244,7 +2244,7 @@ export class SwitchBotPlatform {
|
|
|
2244
2244
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2245
2245
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2246
2246
|
if (device.version && !device.firmware) {
|
|
2247
|
-
existingAccessory.context.version = device.version;
|
|
2247
|
+
existingAccessory.context.version = device.version.toString();
|
|
2248
2248
|
}
|
|
2249
2249
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2250
2250
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -2272,7 +2272,7 @@ export class SwitchBotPlatform {
|
|
|
2272
2272
|
accessory.context.model = device.remoteType;
|
|
2273
2273
|
accessory.context.deviceID = device.deviceId;
|
|
2274
2274
|
if (device.version && !device.firmware) {
|
|
2275
|
-
accessory.context.version = device.version;
|
|
2275
|
+
accessory.context.version = device.version.toString();
|
|
2276
2276
|
}
|
|
2277
2277
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2278
2278
|
accessory.context.connectionType = device.connectionType;
|
|
@@ -2301,7 +2301,7 @@ export class SwitchBotPlatform {
|
|
|
2301
2301
|
existingAccessory.context.deviceID = device.deviceId;
|
|
2302
2302
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
2303
2303
|
if (device.version && !device.firmware) {
|
|
2304
|
-
existingAccessory.context.version = device.version;
|
|
2304
|
+
existingAccessory.context.version = device.version.toString();
|
|
2305
2305
|
}
|
|
2306
2306
|
existingAccessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2307
2307
|
this.infoLog(`Restoring existing accessory from cache: ${existingAccessory.displayName} DeviceID: ${device.deviceId}`);
|
|
@@ -2329,7 +2329,7 @@ export class SwitchBotPlatform {
|
|
|
2329
2329
|
accessory.context.model = device.remoteType;
|
|
2330
2330
|
accessory.context.deviceID = device.deviceId;
|
|
2331
2331
|
if (device.version && !device.firmware) {
|
|
2332
|
-
accessory.context.version = device.version;
|
|
2332
|
+
accessory.context.version = device.version.toString();
|
|
2333
2333
|
}
|
|
2334
2334
|
accessory.context.deviceType = `IR: ${device.remoteType}`;
|
|
2335
2335
|
accessory.context.connectionType = device.connectionType;
|