@switchbot/homebridge-switchbot 3.5.0-beta.50 → 3.5.0-beta.51
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.d.ts.map +1 -1
- package/dist/device/blindtilt.js +3 -2
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +3 -2
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +3 -2
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +3 -2
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +3 -2
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +3 -2
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/device.js +2 -1
- package/dist/device/device.js.map +1 -1
- package/dist/device/fan.d.ts.map +1 -1
- package/dist/device/fan.js +3 -2
- package/dist/device/fan.js.map +1 -1
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +3 -2
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +3 -2
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.d.ts.map +1 -1
- package/dist/device/iosensor.js +3 -2
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.d.ts.map +1 -1
- package/dist/device/lightstrip.js +3 -2
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +3 -2
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +3 -2
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +3 -2
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +3 -2
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +3 -2
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
- package/dist/device/robotvacuumcleaner.js +3 -2
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.d.ts.map +1 -1
- package/dist/device/waterdetector.js +3 -2
- package/dist/device/waterdetector.js.map +1 -1
- package/eslint.config.js +87 -0
- package/package.json +5 -5
- package/src/device/blindtilt.ts +3 -2
- package/src/device/bot.ts +3 -2
- package/src/device/ceilinglight.ts +3 -2
- package/src/device/colorbulb.ts +3 -2
- package/src/device/contact.ts +3 -2
- package/src/device/curtain.ts +3 -2
- package/src/device/device.ts +2 -1
- package/src/device/fan.ts +3 -2
- package/src/device/hub.ts +3 -2
- package/src/device/humidifier.ts +3 -2
- package/src/device/iosensor.ts +3 -2
- package/src/device/lightstrip.ts +3 -2
- package/src/device/lock.ts +3 -2
- package/src/device/meter.ts +3 -2
- package/src/device/meterplus.ts +3 -2
- package/src/device/motion.ts +3 -2
- package/src/device/plug.ts +3 -2
- package/src/device/robotvacuumcleaner.ts +3 -2
- package/src/device/waterdetector.ts +3 -2
package/eslint.config.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
"parser": "@typescript-eslint/parser",
|
|
4
|
+
"extends": [
|
|
5
|
+
"eslint:recommended",
|
|
6
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
|
7
|
+
"plugin:@typescript-eslint/recommended" // uses the recommended rules from the @typescript-eslint/eslint-plugin
|
|
8
|
+
],
|
|
9
|
+
"parserOptions": {
|
|
10
|
+
"ecmaVersion": 2021,
|
|
11
|
+
"sourceType": "module"
|
|
12
|
+
},
|
|
13
|
+
"ignorePatterns": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"rules": {
|
|
17
|
+
"quotes": [
|
|
18
|
+
"warn",
|
|
19
|
+
"single"
|
|
20
|
+
],
|
|
21
|
+
"indent": [
|
|
22
|
+
"warn",
|
|
23
|
+
2,
|
|
24
|
+
{
|
|
25
|
+
"SwitchCase": 1
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"linebreak-style": [
|
|
29
|
+
"warn",
|
|
30
|
+
"unix"
|
|
31
|
+
],
|
|
32
|
+
"semi": [
|
|
33
|
+
"warn",
|
|
34
|
+
"always"
|
|
35
|
+
],
|
|
36
|
+
"comma-dangle": [
|
|
37
|
+
"warn",
|
|
38
|
+
"always-multiline"
|
|
39
|
+
],
|
|
40
|
+
"dot-notation": "off",
|
|
41
|
+
"eqeqeq": "warn",
|
|
42
|
+
"curly": [
|
|
43
|
+
"warn",
|
|
44
|
+
"all"
|
|
45
|
+
],
|
|
46
|
+
"brace-style": [
|
|
47
|
+
"warn"
|
|
48
|
+
],
|
|
49
|
+
"prefer-arrow-callback": [
|
|
50
|
+
"warn"
|
|
51
|
+
],
|
|
52
|
+
"max-len": [
|
|
53
|
+
"warn",
|
|
54
|
+
150
|
|
55
|
+
],
|
|
56
|
+
"no-console": [
|
|
57
|
+
"warn"
|
|
58
|
+
], // use the provided Homebridge log method instead
|
|
59
|
+
"no-non-null-assertion": [
|
|
60
|
+
"off"
|
|
61
|
+
],
|
|
62
|
+
"comma-spacing": [
|
|
63
|
+
"error"
|
|
64
|
+
],
|
|
65
|
+
"no-multi-spaces": [
|
|
66
|
+
"warn",
|
|
67
|
+
{
|
|
68
|
+
"ignoreEOLComments": true
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"no-trailing-spaces": [
|
|
72
|
+
"warn"
|
|
73
|
+
],
|
|
74
|
+
"lines-between-class-members": [
|
|
75
|
+
"warn",
|
|
76
|
+
"always",
|
|
77
|
+
{
|
|
78
|
+
"exceptAfterSingleLine": true
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
82
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
83
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
84
|
+
"@typescript-eslint/no-explicit-any": "off"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "SwitchBot",
|
|
3
3
|
"name": "@switchbot/homebridge-switchbot",
|
|
4
|
-
"version": "3.5.0-beta.
|
|
4
|
+
"version": "3.5.0-beta.51",
|
|
5
5
|
"description": "The SwitchBot plugin allows you to access your SwitchBot device(s) from HomeKit.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "SwitchBot",
|
|
@@ -82,16 +82,16 @@
|
|
|
82
82
|
"fakegato-history": "^0.6.4",
|
|
83
83
|
"homebridge-lib": "^7.0.1",
|
|
84
84
|
"rxjs": "^7.8.1",
|
|
85
|
-
"undici": "^6.
|
|
85
|
+
"undici": "^6.17.0"
|
|
86
86
|
},
|
|
87
87
|
"optionalDependencies": {
|
|
88
88
|
"node-switchbot": "2.1.0"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"@types/node": "^20.12.12",
|
|
92
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
93
|
-
"@typescript-eslint/parser": "^
|
|
94
|
-
"eslint": "^
|
|
92
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0-alpha.13",
|
|
93
|
+
"@typescript-eslint/parser": "^8.0.0-alpha.13",
|
|
94
|
+
"eslint": "^9.3.0",
|
|
95
95
|
"homebridge": "^1.8.2",
|
|
96
96
|
"homebridge-config-ui-x": "4.56.2",
|
|
97
97
|
"nodemon": "^3.1.0",
|
package/src/device/blindtilt.ts
CHANGED
|
@@ -436,9 +436,10 @@ export class BlindTilt extends deviceBase {
|
|
|
436
436
|
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
437
437
|
|
|
438
438
|
// Firmware Version
|
|
439
|
-
|
|
439
|
+
const version = deviceStatus.body.version?.toString();
|
|
440
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
440
441
|
if (deviceStatus.body.version) {
|
|
441
|
-
this.accessory.context.version =
|
|
442
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
442
443
|
this.accessory
|
|
443
444
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
444
445
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
package/src/device/bot.ts
CHANGED
|
@@ -519,9 +519,10 @@ export class Bot extends deviceBase {
|
|
|
519
519
|
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
520
520
|
|
|
521
521
|
// Firmware Version
|
|
522
|
-
|
|
522
|
+
const version = deviceStatus.body.version?.toString();
|
|
523
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
523
524
|
if (deviceStatus.body.version) {
|
|
524
|
-
this.accessory.context.version =
|
|
525
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
525
526
|
this.accessory
|
|
526
527
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
527
528
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
@@ -288,9 +288,10 @@ export class CeilingLight extends deviceBase {
|
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
// Firmware Version
|
|
291
|
-
|
|
291
|
+
const version = deviceStatus.body.version?.toString();
|
|
292
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
292
293
|
if (deviceStatus.body.version) {
|
|
293
|
-
this.accessory.context.version =
|
|
294
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
294
295
|
this.accessory
|
|
295
296
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
296
297
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
package/src/device/colorbulb.ts
CHANGED
|
@@ -349,9 +349,10 @@ export class ColorBulb extends deviceBase {
|
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
// Firmware Version
|
|
352
|
-
|
|
352
|
+
const version = deviceStatus.body.version?.toString();
|
|
353
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
353
354
|
if (deviceStatus.body.version) {
|
|
354
|
-
this.accessory.context.version =
|
|
355
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
355
356
|
this.accessory
|
|
356
357
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
357
358
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
package/src/device/contact.ts
CHANGED
|
@@ -279,9 +279,10 @@ export class Contact extends deviceBase {
|
|
|
279
279
|
+ `StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
280
280
|
|
|
281
281
|
// Firmware Version
|
|
282
|
-
|
|
282
|
+
const version = deviceStatus.body.version?.toString();
|
|
283
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
283
284
|
if (deviceStatus.body.version) {
|
|
284
|
-
this.accessory.context.version =
|
|
285
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
285
286
|
this.accessory
|
|
286
287
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
287
288
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
package/src/device/curtain.ts
CHANGED
|
@@ -464,9 +464,10 @@ export class Curtain extends deviceBase {
|
|
|
464
464
|
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
465
465
|
|
|
466
466
|
// Firmware Version
|
|
467
|
-
|
|
467
|
+
const version = deviceStatus.body.version?.toString();
|
|
468
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
468
469
|
if (deviceStatus.body.version) {
|
|
469
|
-
this.accessory.context.version =
|
|
470
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
470
471
|
this.accessory
|
|
471
472
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
472
473
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
package/src/device/device.ts
CHANGED
|
@@ -549,12 +549,13 @@ export abstract class deviceBase {
|
|
|
549
549
|
device.version = this.platform.version;
|
|
550
550
|
accessory.context.version = this.platform.version;
|
|
551
551
|
} else {
|
|
552
|
-
accessory.context.version = device.version?.
|
|
552
|
+
accessory.context.version = device.version?.replace(/^V|-.*$/g, '');
|
|
553
553
|
}
|
|
554
554
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${accessory.context.version}`);
|
|
555
555
|
if (accessory.context.version) {
|
|
556
556
|
this.accessory
|
|
557
557
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
558
|
+
.setCharacteristic(this.hap.Characteristic.HardwareRevision, accessory.context.version)
|
|
558
559
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, accessory.context.version)
|
|
559
560
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
560
561
|
.updateValue(this.accessory.context.version);
|
package/src/device/fan.ts
CHANGED
|
@@ -204,9 +204,10 @@ export class Fan extends deviceBase {
|
|
|
204
204
|
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
205
205
|
|
|
206
206
|
// Firmware Version
|
|
207
|
-
|
|
207
|
+
const version = deviceStatus.body.version?.toString();
|
|
208
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
208
209
|
if (deviceStatus.body.version) {
|
|
209
|
-
this.accessory.context.version =
|
|
210
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
210
211
|
this.accessory
|
|
211
212
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
212
213
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
package/src/device/hub.ts
CHANGED
|
@@ -217,9 +217,10 @@ export class Hub extends deviceBase {
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
// Firmware Version
|
|
220
|
-
|
|
220
|
+
const version = deviceStatus.body.version?.toString();
|
|
221
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
221
222
|
if (deviceStatus.body.version) {
|
|
222
|
-
this.accessory.context.version =
|
|
223
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
223
224
|
this.accessory
|
|
224
225
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
225
226
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
package/src/device/humidifier.ts
CHANGED
|
@@ -268,9 +268,10 @@ export class Humidifier extends deviceBase {
|
|
|
268
268
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} WaterLevel: ${this.HumidifierDehumidifier.WaterLevel}`);
|
|
269
269
|
|
|
270
270
|
// Firmware Version
|
|
271
|
-
|
|
271
|
+
const version = deviceStatus.body.version?.toString();
|
|
272
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
272
273
|
if (deviceStatus.body.version) {
|
|
273
|
-
this.accessory.context.version =
|
|
274
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
274
275
|
this.accessory
|
|
275
276
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
276
277
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
package/src/device/iosensor.ts
CHANGED
|
@@ -228,9 +228,10 @@ export class IOSensor extends deviceBase {
|
|
|
228
228
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Temperature: ${this.TemperatureSensor!.CurrentTemperature}°c`);
|
|
229
229
|
}
|
|
230
230
|
// Firmware Version
|
|
231
|
-
|
|
231
|
+
const version = deviceStatus.body.version?.toString();
|
|
232
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
232
233
|
if (deviceStatus.body.version) {
|
|
233
|
-
this.accessory.context.version =
|
|
234
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
234
235
|
this.accessory
|
|
235
236
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
236
237
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
package/src/device/lightstrip.ts
CHANGED
|
@@ -326,9 +326,10 @@ export class StripLight extends deviceBase {
|
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
// Firmware Version
|
|
329
|
-
|
|
329
|
+
const version = deviceStatus.body.version?.toString();
|
|
330
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
330
331
|
if (deviceStatus.body.version) {
|
|
331
|
-
this.accessory.context.version =
|
|
332
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
332
333
|
this.accessory
|
|
333
334
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
334
335
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
package/src/device/lock.ts
CHANGED
|
@@ -256,9 +256,10 @@ export class Lock extends deviceBase {
|
|
|
256
256
|
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
257
257
|
|
|
258
258
|
// Firmware Version
|
|
259
|
-
|
|
259
|
+
const version = deviceStatus.body.version?.toString();
|
|
260
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
260
261
|
if (deviceStatus.body.version) {
|
|
261
|
-
this.accessory.context.version =
|
|
262
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
262
263
|
this.accessory
|
|
263
264
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
264
265
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
package/src/device/meter.ts
CHANGED
|
@@ -224,9 +224,10 @@ export class Meter extends deviceBase {
|
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
// Firmware Version
|
|
227
|
-
|
|
227
|
+
const version = deviceStatus.body.version?.toString();
|
|
228
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
228
229
|
if (deviceStatus.body.version) {
|
|
229
|
-
this.accessory.context.version =
|
|
230
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
230
231
|
this.accessory
|
|
231
232
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
232
233
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
package/src/device/meterplus.ts
CHANGED
|
@@ -225,9 +225,10 @@ export class MeterPlus extends deviceBase {
|
|
|
225
225
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Temperature: ${this.TemperatureSensor!.CurrentTemperature}°c`);
|
|
226
226
|
}
|
|
227
227
|
// Firmware Version
|
|
228
|
-
|
|
228
|
+
const version = deviceStatus.body.version?.toString();
|
|
229
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
229
230
|
if (deviceStatus.body.version) {
|
|
230
|
-
this.accessory.context.version =
|
|
231
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
231
232
|
this.accessory
|
|
232
233
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
233
234
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
package/src/device/motion.ts
CHANGED
|
@@ -200,9 +200,10 @@ export class Motion extends deviceBase {
|
|
|
200
200
|
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
201
201
|
|
|
202
202
|
// Firmware Version
|
|
203
|
-
|
|
203
|
+
const version = deviceStatus.body.version?.toString();
|
|
204
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
204
205
|
if (deviceStatus.body.version) {
|
|
205
|
-
this.accessory.context.version =
|
|
206
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
206
207
|
this.accessory
|
|
207
208
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
208
209
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
package/src/device/plug.ts
CHANGED
|
@@ -130,9 +130,10 @@ export class Plug extends deviceBase {
|
|
|
130
130
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} On: ${this.Outlet.On}`);
|
|
131
131
|
|
|
132
132
|
// Firmware Version
|
|
133
|
-
|
|
133
|
+
const version = deviceStatus.body.version?.toString();
|
|
134
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
134
135
|
if (deviceStatus.body.version) {
|
|
135
|
-
this.accessory.context.version =
|
|
136
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
136
137
|
this.accessory
|
|
137
138
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
138
139
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
@@ -199,9 +199,10 @@ export class RobotVacuumCleaner extends deviceBase {
|
|
|
199
199
|
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
200
200
|
|
|
201
201
|
// Firmware Version
|
|
202
|
-
|
|
202
|
+
const version = deviceStatus.body.version?.toString();
|
|
203
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
203
204
|
if (deviceStatus.body.version) {
|
|
204
|
-
this.accessory.context.version =
|
|
205
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
205
206
|
this.accessory
|
|
206
207
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
207
208
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
@@ -166,9 +166,10 @@ export class WaterDetector extends deviceBase {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
// Firmware Version
|
|
169
|
-
|
|
169
|
+
const version = deviceStatus.body.version?.toString();
|
|
170
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
170
171
|
if (deviceStatus.body.version) {
|
|
171
|
-
this.accessory.context.version =
|
|
172
|
+
this.accessory.context.version = version?.replace(/^V|-.*$/g, '');
|
|
172
173
|
this.accessory
|
|
173
174
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
174
175
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|