@switchbot/homebridge-switchbot 2.8.0-beta.5 → 2.8.0-beta.6
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 +2 -2
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.js +2 -2
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +5 -5
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +2 -2
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.js +2 -2
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.js +2 -2
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/hub.d.ts +1 -0
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +22 -0
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +2 -2
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.js +2 -2
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.d.ts.map +1 -1
- package/dist/device/lightstrip.js +2 -2
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +2 -2
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.js +2 -2
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.js +2 -2
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.js +2 -2
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.js +2 -2
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.js +2 -2
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/irdevice/airconditioner.d.ts.map +1 -1
- package/dist/irdevice/airconditioner.js +6 -4
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/irdevice/airpurifier.js +2 -2
- package/dist/irdevice/airpurifier.js.map +1 -1
- package/dist/irdevice/camera.js +2 -2
- package/dist/irdevice/camera.js.map +1 -1
- package/dist/irdevice/fan.js +2 -2
- package/dist/irdevice/fan.js.map +1 -1
- package/dist/irdevice/light.js +2 -2
- package/dist/irdevice/light.js.map +1 -1
- package/dist/irdevice/other.js +2 -2
- package/dist/irdevice/other.js.map +1 -1
- package/dist/irdevice/tv.js +2 -2
- package/dist/irdevice/tv.js.map +1 -1
- package/dist/irdevice/vacuumcleaner.js +2 -2
- package/dist/irdevice/vacuumcleaner.js.map +1 -1
- package/dist/irdevice/waterheater.js +2 -2
- package/dist/irdevice/waterheater.js.map +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +3 -2
- package/dist/platform.js.map +1 -1
- package/package.json +3 -3
- package/src/device/blindtilt.ts +2 -2
- package/src/device/bot.ts +2 -2
- package/src/device/ceilinglight.ts +6 -3
- package/src/device/colorbulb.ts +4 -2
- package/src/device/contact.ts +2 -2
- package/src/device/curtain.ts +2 -2
- package/src/device/hub.ts +23 -0
- package/src/device/humidifier.ts +3 -2
- package/src/device/iosensor.ts +2 -2
- package/src/device/lightstrip.ts +4 -2
- package/src/device/lock.ts +3 -2
- package/src/device/meter.ts +2 -2
- package/src/device/meterplus.ts +2 -2
- package/src/device/motion.ts +2 -2
- package/src/device/plug.ts +2 -2
- package/src/device/robotvacuumcleaner.ts +2 -2
- package/src/irdevice/airconditioner.ts +6 -4
- package/src/irdevice/airpurifier.ts +2 -2
- package/src/irdevice/camera.ts +2 -2
- package/src/irdevice/fan.ts +2 -2
- package/src/irdevice/light.ts +2 -2
- package/src/irdevice/other.ts +2 -2
- package/src/irdevice/tv.ts +2 -2
- package/src/irdevice/vacuumcleaner.ts +2 -2
- package/src/irdevice/waterheater.ts +2 -2
- package/src/platform.ts +3 -2
package/src/device/colorbulb.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable brace-style */
|
|
1
2
|
import { Context } from 'vm';
|
|
2
3
|
import { request } from 'undici';
|
|
3
4
|
import { sleep } from '../utils';
|
|
@@ -82,8 +83,9 @@ export class ColorBulb {
|
|
|
82
83
|
this.scan(device);
|
|
83
84
|
this.refreshRate(device);
|
|
84
85
|
this.adaptiveLighting(device);
|
|
85
|
-
this.config(device);
|
|
86
86
|
this.context();
|
|
87
|
+
this.config(device);
|
|
88
|
+
|
|
87
89
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
88
90
|
this.doColorBulbUpdate = new Subject();
|
|
89
91
|
this.colorBulbUpdateInProgress = false;
|
|
@@ -1210,7 +1212,7 @@ export class ColorBulb {
|
|
|
1210
1212
|
config['maxRetry'] = device.maxRetry;
|
|
1211
1213
|
}
|
|
1212
1214
|
if (Object.entries(config).length !== 0) {
|
|
1213
|
-
this.
|
|
1215
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
1214
1216
|
}
|
|
1215
1217
|
}
|
|
1216
1218
|
|
package/src/device/contact.ts
CHANGED
|
@@ -71,8 +71,8 @@ export class Contact {
|
|
|
71
71
|
this.logs(device);
|
|
72
72
|
this.scan(device);
|
|
73
73
|
this.refreshRate(device);
|
|
74
|
-
this.config(device);
|
|
75
74
|
this.context();
|
|
75
|
+
this.config(device);
|
|
76
76
|
|
|
77
77
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
78
78
|
this.doContactUpdate = new Subject();
|
|
@@ -647,7 +647,7 @@ export class Contact {
|
|
|
647
647
|
config['scanDuration'] = device.scanDuration;
|
|
648
648
|
}
|
|
649
649
|
if (Object.entries(config).length !== 0) {
|
|
650
|
-
this.
|
|
650
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
|
package/src/device/curtain.ts
CHANGED
|
@@ -83,9 +83,9 @@ export class Curtain {
|
|
|
83
83
|
this.logs(device);
|
|
84
84
|
this.refreshRate(device);
|
|
85
85
|
this.scan(device);
|
|
86
|
-
this.config(device);
|
|
87
86
|
this.setupMqtt(device);
|
|
88
87
|
this.context();
|
|
88
|
+
this.config(device);
|
|
89
89
|
|
|
90
90
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
91
91
|
this.doCurtainUpdate = new Subject();
|
|
@@ -1188,7 +1188,7 @@ export class Curtain {
|
|
|
1188
1188
|
config['maxRetry'] = device.maxRetry;
|
|
1189
1189
|
}
|
|
1190
1190
|
if (Object.entries(config).length !== 0) {
|
|
1191
|
-
this.
|
|
1191
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
1192
1192
|
}
|
|
1193
1193
|
}
|
|
1194
1194
|
|
package/src/device/hub.ts
CHANGED
|
@@ -43,6 +43,7 @@ export class Hub {
|
|
|
43
43
|
// default placeholders
|
|
44
44
|
this.logs(device);
|
|
45
45
|
this.refreshRate(device);
|
|
46
|
+
this.config(device);
|
|
46
47
|
|
|
47
48
|
this.CurrentRelativeHumidity = accessory.context.CurrentRelativeHumidity;
|
|
48
49
|
this.CurrentTemperature = accessory.context.CurrentTemperature;
|
|
@@ -472,6 +473,28 @@ export class Hub {
|
|
|
472
473
|
}
|
|
473
474
|
}
|
|
474
475
|
|
|
476
|
+
async config(device: device & devicesConfig): Promise<void> {
|
|
477
|
+
let config = {};
|
|
478
|
+
if (device.hub) {
|
|
479
|
+
config = device.hub;
|
|
480
|
+
}
|
|
481
|
+
if (device.connectionType !== undefined) {
|
|
482
|
+
config['connectionType'] = device.connectionType;
|
|
483
|
+
}
|
|
484
|
+
if (device.external !== undefined) {
|
|
485
|
+
config['external'] = device.external;
|
|
486
|
+
}
|
|
487
|
+
if (device.logging !== undefined) {
|
|
488
|
+
config['logging'] = device.logging;
|
|
489
|
+
}
|
|
490
|
+
if (device.refreshRate !== undefined) {
|
|
491
|
+
config['refreshRate'] = device.refreshRate;
|
|
492
|
+
}
|
|
493
|
+
if (Object.entries(config).length !== 0) {
|
|
494
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
475
498
|
async logs(device: device & devicesConfig): Promise<void> {
|
|
476
499
|
if (this.platform.debugMode) {
|
|
477
500
|
this.deviceLogging = this.accessory.context.logging = 'debugMode';
|
package/src/device/humidifier.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable brace-style */
|
|
1
2
|
import { Context } from 'vm';
|
|
2
3
|
import { request } from 'undici';
|
|
3
4
|
import { sleep } from '../utils';
|
|
@@ -66,8 +67,8 @@ export class Humidifier {
|
|
|
66
67
|
this.logs(device);
|
|
67
68
|
this.scan(device);
|
|
68
69
|
this.refreshRate(device);
|
|
69
|
-
this.config(device);
|
|
70
70
|
this.context();
|
|
71
|
+
this.config(device);
|
|
71
72
|
|
|
72
73
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
73
74
|
this.doHumidifierUpdate = new Subject();
|
|
@@ -930,7 +931,7 @@ export class Humidifier {
|
|
|
930
931
|
config['offline'] = device.offline;
|
|
931
932
|
}
|
|
932
933
|
if (Object.entries(config).length !== 0) {
|
|
933
|
-
this.
|
|
934
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
934
935
|
}
|
|
935
936
|
}
|
|
936
937
|
|
package/src/device/iosensor.ts
CHANGED
|
@@ -73,10 +73,10 @@ export class IOSensor {
|
|
|
73
73
|
this.logs(device);
|
|
74
74
|
this.scan(device);
|
|
75
75
|
this.refreshRate(device);
|
|
76
|
-
this.config(device);
|
|
77
76
|
this.context();
|
|
78
77
|
this.setupHistoryService(device);
|
|
79
78
|
this.setupMqtt(device);
|
|
79
|
+
this.config(device);
|
|
80
80
|
|
|
81
81
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
82
82
|
this.doIOSensorUpdate = new Subject();
|
|
@@ -660,7 +660,7 @@ export class IOSensor {
|
|
|
660
660
|
config['scanDuration'] = device.scanDuration;
|
|
661
661
|
}
|
|
662
662
|
if (Object.entries(config).length !== 0) {
|
|
663
|
-
this.
|
|
663
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
666
|
|
package/src/device/lightstrip.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable brace-style */
|
|
1
2
|
import { Context } from 'vm';
|
|
2
3
|
import { request } from 'undici';
|
|
3
4
|
import { sleep } from '../utils';
|
|
@@ -71,8 +72,9 @@ export class StripLight {
|
|
|
71
72
|
this.logs(device);
|
|
72
73
|
this.scan(device);
|
|
73
74
|
this.refreshRate(device);
|
|
74
|
-
this.config(device);
|
|
75
75
|
this.context();
|
|
76
|
+
this.config(device);
|
|
77
|
+
|
|
76
78
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
77
79
|
this.doStripLightUpdate = new Subject();
|
|
78
80
|
this.stripLightUpdateInProgress = false;
|
|
@@ -1065,7 +1067,7 @@ export class StripLight {
|
|
|
1065
1067
|
config['maxRetry'] = device.maxRetry;
|
|
1066
1068
|
}
|
|
1067
1069
|
if (Object.entries(config).length !== 0) {
|
|
1068
|
-
this.
|
|
1070
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
1069
1071
|
}
|
|
1070
1072
|
}
|
|
1071
1073
|
|
package/src/device/lock.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable brace-style */
|
|
1
2
|
import { Context } from 'vm';
|
|
2
3
|
import { request } from 'undici';
|
|
3
4
|
import { sleep } from '../utils';
|
|
@@ -59,8 +60,8 @@ export class Lock {
|
|
|
59
60
|
this.logs(device);
|
|
60
61
|
this.scan(device);
|
|
61
62
|
this.refreshRate(device);
|
|
62
|
-
this.config(device);
|
|
63
63
|
this.context();
|
|
64
|
+
this.config(device);
|
|
64
65
|
|
|
65
66
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
66
67
|
this.doLockUpdate = new Subject();
|
|
@@ -646,7 +647,7 @@ export class Lock {
|
|
|
646
647
|
config['scanDuration'] = device.scanDuration;
|
|
647
648
|
}
|
|
648
649
|
if (Object.entries(config).length !== 0) {
|
|
649
|
-
this.
|
|
650
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
650
651
|
}
|
|
651
652
|
}
|
|
652
653
|
|
package/src/device/meter.ts
CHANGED
|
@@ -72,10 +72,10 @@ export class Meter {
|
|
|
72
72
|
this.logs(device);
|
|
73
73
|
this.scan(device);
|
|
74
74
|
this.refreshRate(device);
|
|
75
|
-
this.config(device);
|
|
76
75
|
this.context();
|
|
77
76
|
this.setupHistoryService(device);
|
|
78
77
|
this.setupMqtt(device);
|
|
78
|
+
this.config(device);
|
|
79
79
|
|
|
80
80
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
81
81
|
this.doMeterUpdate = new Subject();
|
|
@@ -667,7 +667,7 @@ export class Meter {
|
|
|
667
667
|
config['scanDuration'] = device.scanDuration;
|
|
668
668
|
}
|
|
669
669
|
if (Object.entries(config).length !== 0) {
|
|
670
|
-
this.
|
|
670
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
671
671
|
}
|
|
672
672
|
}
|
|
673
673
|
|
package/src/device/meterplus.ts
CHANGED
|
@@ -73,10 +73,10 @@ export class MeterPlus {
|
|
|
73
73
|
this.logs(device);
|
|
74
74
|
this.scan(device);
|
|
75
75
|
this.refreshRate(device);
|
|
76
|
-
this.config(device);
|
|
77
76
|
this.context();
|
|
78
77
|
this.setupHistoryService(device);
|
|
79
78
|
this.setupMqtt(device);
|
|
79
|
+
this.config(device);
|
|
80
80
|
|
|
81
81
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
82
82
|
this.doMeterUpdate = new Subject();
|
|
@@ -676,7 +676,7 @@ export class MeterPlus {
|
|
|
676
676
|
config['scanDuration'] = device.scanDuration;
|
|
677
677
|
}
|
|
678
678
|
if (Object.entries(config).length !== 0) {
|
|
679
|
-
this.
|
|
679
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
682
|
|
package/src/device/motion.ts
CHANGED
|
@@ -68,8 +68,8 @@ export class Motion {
|
|
|
68
68
|
this.logs(device);
|
|
69
69
|
this.scan(device);
|
|
70
70
|
this.refreshRate(device);
|
|
71
|
-
this.config(device);
|
|
72
71
|
this.context();
|
|
72
|
+
this.config(device);
|
|
73
73
|
|
|
74
74
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
75
75
|
this.doMotionUpdate = new Subject();
|
|
@@ -605,7 +605,7 @@ export class Motion {
|
|
|
605
605
|
config['offline'] = device.offline;
|
|
606
606
|
}
|
|
607
607
|
if (Object.entries(config).length !== 0) {
|
|
608
|
-
this.
|
|
608
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
609
609
|
}
|
|
610
610
|
}
|
|
611
611
|
|
package/src/device/plug.ts
CHANGED
|
@@ -53,8 +53,8 @@ export class Plug {
|
|
|
53
53
|
this.logs(device);
|
|
54
54
|
this.scan(device);
|
|
55
55
|
this.refreshRate(device);
|
|
56
|
-
this.config(device);
|
|
57
56
|
this.context();
|
|
57
|
+
this.config(device);
|
|
58
58
|
|
|
59
59
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
60
60
|
this.doPlugUpdate = new Subject();
|
|
@@ -638,7 +638,7 @@ export class Plug {
|
|
|
638
638
|
config['maxRetry'] = device.maxRetry;
|
|
639
639
|
}
|
|
640
640
|
if (Object.entries(config).length !== 0) {
|
|
641
|
-
this.
|
|
641
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
644
|
|
|
@@ -51,8 +51,8 @@ export class RobotVacuumCleaner {
|
|
|
51
51
|
this.logs(device);
|
|
52
52
|
this.scan(device);
|
|
53
53
|
this.refreshRate(device);
|
|
54
|
-
this.config(device);
|
|
55
54
|
this.context();
|
|
55
|
+
this.config(device);
|
|
56
56
|
|
|
57
57
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
58
58
|
this.doRobotVacuumCleanerUpdate = new Subject();
|
|
@@ -758,7 +758,7 @@ export class RobotVacuumCleaner {
|
|
|
758
758
|
config['maxRetry'] = device.maxRetry;
|
|
759
759
|
}
|
|
760
760
|
if (Object.entries(config).length !== 0) {
|
|
761
|
-
this.
|
|
761
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
762
762
|
}
|
|
763
763
|
}
|
|
764
764
|
|
|
@@ -50,11 +50,11 @@ export class AirConditioner {
|
|
|
50
50
|
) {
|
|
51
51
|
// default placeholders
|
|
52
52
|
this.logs({ device });
|
|
53
|
-
this.config({ device });
|
|
54
53
|
this.context();
|
|
55
54
|
this.disablePushOnChanges({ device });
|
|
56
55
|
this.disablePushOffChanges({ device });
|
|
57
56
|
this.disablePushDetailChanges({ device });
|
|
57
|
+
this.config({ device });
|
|
58
58
|
|
|
59
59
|
// set accessory information
|
|
60
60
|
accessory
|
|
@@ -291,7 +291,8 @@ export class AirConditioner {
|
|
|
291
291
|
this.meter.getService(this.platform.Service.TemperatureSensor)?.getCharacteristic(this.platform.Characteristic.CurrentTemperature).value ||
|
|
292
292
|
24;
|
|
293
293
|
this.debugLog(
|
|
294
|
-
`${this.device.remoteType}: ${this.accessory.displayName}
|
|
294
|
+
`${this.device.remoteType}: ${this.accessory.displayName} `
|
|
295
|
+
+ `Using CurrentTemperature from ${this.meter.context?.deviceType} (${this.meter.context?.deviceID})`,
|
|
295
296
|
);
|
|
296
297
|
} else if (this.CurrentTemperature === undefined) {
|
|
297
298
|
this.CurrentTemperature = 24;
|
|
@@ -309,7 +310,8 @@ export class AirConditioner {
|
|
|
309
310
|
this.meter.getService(this.platform.Service.HumiditySensor)?.getCharacteristic(this.platform.Characteristic.CurrentRelativeHumidity).value ||
|
|
310
311
|
0;
|
|
311
312
|
this.debugLog(
|
|
312
|
-
`${this.device.remoteType}: ${this.accessory.displayName}
|
|
313
|
+
`${this.device.remoteType}: ${this.accessory.displayName} `
|
|
314
|
+
+ `Using CurrentRelativeHumidity from ${this.meter.context?.deviceType} (${this.meter.context?.deviceID})`,
|
|
313
315
|
);
|
|
314
316
|
} else if (this.CurrentRelativeHumidity === undefined) {
|
|
315
317
|
this.CurrentRelativeHumidity = 0;
|
|
@@ -715,7 +717,7 @@ export class AirConditioner {
|
|
|
715
717
|
config['disablePushDetail'] = device.disablePushDetail;
|
|
716
718
|
}
|
|
717
719
|
if (Object.entries(config).length !== 0) {
|
|
718
|
-
this.
|
|
720
|
+
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
719
721
|
}
|
|
720
722
|
}
|
|
721
723
|
|
|
@@ -45,10 +45,10 @@ export class AirPurifier {
|
|
|
45
45
|
) {
|
|
46
46
|
// default placeholders
|
|
47
47
|
this.logs(device);
|
|
48
|
-
this.config(device);
|
|
49
48
|
this.context();
|
|
50
49
|
this.disablePushOnChanges({ device });
|
|
51
50
|
this.disablePushOffChanges({ device });
|
|
51
|
+
this.config(device);
|
|
52
52
|
|
|
53
53
|
// set accessory information
|
|
54
54
|
accessory
|
|
@@ -420,7 +420,7 @@ export class AirPurifier {
|
|
|
420
420
|
config['disablePushOff'] = device.disablePushOff;
|
|
421
421
|
}
|
|
422
422
|
if (Object.entries(config).length !== 0) {
|
|
423
|
-
this.
|
|
423
|
+
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
|
package/src/irdevice/camera.ts
CHANGED
|
@@ -27,10 +27,10 @@ export class Camera {
|
|
|
27
27
|
) {
|
|
28
28
|
// default placeholders
|
|
29
29
|
this.logs(device);
|
|
30
|
-
this.config(device);
|
|
31
30
|
this.context();
|
|
32
31
|
this.disablePushOnChanges({ device });
|
|
33
32
|
this.disablePushOffChanges({ device });
|
|
33
|
+
this.config(device);
|
|
34
34
|
|
|
35
35
|
// set accessory information
|
|
36
36
|
accessory
|
|
@@ -298,7 +298,7 @@ export class Camera {
|
|
|
298
298
|
config['disablePushOff'] = device.disablePushOff;
|
|
299
299
|
}
|
|
300
300
|
if (Object.entries(config).length !== 0) {
|
|
301
|
-
this.
|
|
301
|
+
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
|
package/src/irdevice/fan.ts
CHANGED
|
@@ -37,10 +37,10 @@ export class Fan {
|
|
|
37
37
|
) {
|
|
38
38
|
// default placeholders
|
|
39
39
|
this.logs(device);
|
|
40
|
-
this.config(device);
|
|
41
40
|
this.context();
|
|
42
41
|
this.disablePushOnChanges({ device });
|
|
43
42
|
this.disablePushOffChanges({ device });
|
|
43
|
+
this.config(device);
|
|
44
44
|
|
|
45
45
|
// set accessory information
|
|
46
46
|
accessory
|
|
@@ -434,7 +434,7 @@ export class Fan {
|
|
|
434
434
|
config['disablePushOff'] = device.disablePushOff;
|
|
435
435
|
}
|
|
436
436
|
if (Object.entries(config).length !== 0) {
|
|
437
|
-
this.
|
|
437
|
+
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
|
package/src/irdevice/light.ts
CHANGED
|
@@ -27,10 +27,10 @@ export class Light {
|
|
|
27
27
|
) {
|
|
28
28
|
// default placeholders
|
|
29
29
|
this.logs(device);
|
|
30
|
-
this.config(device);
|
|
31
30
|
this.context();
|
|
32
31
|
this.disablePushOnChanges({ device });
|
|
33
32
|
this.disablePushOffChanges({ device });
|
|
33
|
+
this.config(device);
|
|
34
34
|
|
|
35
35
|
// set accessory information
|
|
36
36
|
accessory
|
|
@@ -323,7 +323,7 @@ export class Light {
|
|
|
323
323
|
config['disablePushOff'] = device.disablePushOff;
|
|
324
324
|
}
|
|
325
325
|
if (Object.entries(config).length !== 0) {
|
|
326
|
-
this.
|
|
326
|
+
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
|
package/src/irdevice/other.ts
CHANGED
|
@@ -29,10 +29,10 @@ export class Others {
|
|
|
29
29
|
// default placeholders
|
|
30
30
|
this.logs(device);
|
|
31
31
|
this.deviceType(device);
|
|
32
|
-
this.config(device);
|
|
33
32
|
this.context();
|
|
34
33
|
this.disablePushOnChanges({ device });
|
|
35
34
|
this.disablePushOffChanges({ device });
|
|
35
|
+
this.config(device);
|
|
36
36
|
|
|
37
37
|
// set accessory information
|
|
38
38
|
accessory
|
|
@@ -329,7 +329,7 @@ export class Others {
|
|
|
329
329
|
config['disablePushOff'] = device.disablePushOff;
|
|
330
330
|
}
|
|
331
331
|
if (Object.entries(config).length !== 0) {
|
|
332
|
-
this.
|
|
332
|
+
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
|
package/src/irdevice/tv.ts
CHANGED
|
@@ -33,11 +33,11 @@ export class TV {
|
|
|
33
33
|
) {
|
|
34
34
|
// default placeholders
|
|
35
35
|
this.logs(device);
|
|
36
|
-
this.config(device);
|
|
37
36
|
this.context();
|
|
38
37
|
this.disablePushOnChanges({ device });
|
|
39
38
|
this.disablePushOffChanges({ device });
|
|
40
39
|
this.disablePushDetailChanges({ device });
|
|
40
|
+
this.config(device);
|
|
41
41
|
|
|
42
42
|
// set accessory information
|
|
43
43
|
accessory
|
|
@@ -574,7 +574,7 @@ export class TV {
|
|
|
574
574
|
config['disablePushDetail'] = device.disablePushDetail;
|
|
575
575
|
}
|
|
576
576
|
if (Object.entries(config).length !== 0) {
|
|
577
|
-
this.
|
|
577
|
+
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
580
|
|
|
@@ -27,10 +27,10 @@ export class VacuumCleaner {
|
|
|
27
27
|
) {
|
|
28
28
|
// default placeholders
|
|
29
29
|
this.logs(device);
|
|
30
|
-
this.config(device);
|
|
31
30
|
this.context();
|
|
32
31
|
this.disablePushOnChanges({ device });
|
|
33
32
|
this.disablePushOffChanges({ device });
|
|
33
|
+
this.config(device);
|
|
34
34
|
|
|
35
35
|
// set accessory information
|
|
36
36
|
accessory
|
|
@@ -294,7 +294,7 @@ export class VacuumCleaner {
|
|
|
294
294
|
config['disablePushOff'] = device.disablePushOff;
|
|
295
295
|
}
|
|
296
296
|
if (Object.entries(config).length !== 0) {
|
|
297
|
-
this.
|
|
297
|
+
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
|
|
@@ -27,10 +27,10 @@ export class WaterHeater {
|
|
|
27
27
|
) {
|
|
28
28
|
// default placeholders
|
|
29
29
|
this.logs({ device });
|
|
30
|
-
this.config({ device });
|
|
31
30
|
this.context();
|
|
32
31
|
this.disablePushOnChanges({ device });
|
|
33
32
|
this.disablePushOffChanges({ device });
|
|
33
|
+
this.config({ device });
|
|
34
34
|
|
|
35
35
|
// set accessory information
|
|
36
36
|
accessory
|
|
@@ -303,7 +303,7 @@ export class WaterHeater {
|
|
|
303
303
|
config['disablePushOff'] = device.disablePushOff;
|
|
304
304
|
}
|
|
305
305
|
if (Object.entries(config).length !== 0) {
|
|
306
|
-
this.
|
|
306
|
+
this.debugWarnLog({ log: [`${this.device.remoteType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`] });
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
|
package/src/platform.ts
CHANGED
|
@@ -138,7 +138,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
138
138
|
platformConfig['pushRate'] = this.config.options.pushRate;
|
|
139
139
|
}
|
|
140
140
|
if (Object.entries(platformConfig).length !== 0) {
|
|
141
|
-
this.
|
|
141
|
+
this.debugWarnLog(`Platform Config: ${JSON.stringify(platformConfig)}`);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
if (this.config.options) {
|
|
@@ -245,7 +245,8 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
245
245
|
} else {
|
|
246
246
|
// eslint-disable-next-line no-useless-escape, max-len
|
|
247
247
|
this.warnLog(
|
|
248
|
-
'This plugin has been updated to use OpenAPI v1.1, config is set with openToken,
|
|
248
|
+
'This plugin has been updated to use OpenAPI v1.1, config is set with openToken, '
|
|
249
|
+
+ '"openToken" config has been moved to the "token" config, please restart Homebridge.',
|
|
249
250
|
);
|
|
250
251
|
}
|
|
251
252
|
|