@switchbot/homebridge-switchbot 2.4.0-beta.1 → 2.4.0-beta.3
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/CHANGELOG.md +5 -1
- package/config.schema.json +18 -10
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +5 -2
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +5 -2
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +5 -2
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/curtain.d.ts +9 -0
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +32 -2
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +5 -2
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
- package/dist/device/robotvacuumcleaner.js +5 -2
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/striplight.d.ts.map +1 -1
- package/dist/device/striplight.js +5 -2
- package/dist/device/striplight.js.map +1 -1
- package/dist/settings.d.ts +1 -1
- package/dist/settings.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/device/bot.ts +6 -3
- package/src/device/ceilinglight.ts +5 -2
- package/src/device/colorbulb.ts +5 -2
- package/src/device/curtain.ts +33 -2
- package/src/device/plug.ts +5 -2
- package/src/device/robotvacuumcleaner.ts +5 -2
- package/src/device/striplight.ts +5 -2
- package/src/settings.ts +1 -1
package/src/device/plug.ts
CHANGED
|
@@ -538,8 +538,8 @@ export class Plug {
|
|
|
538
538
|
|
|
539
539
|
async maxRetry(): Promise<number> {
|
|
540
540
|
let maxRetry: number;
|
|
541
|
-
if (this.device.
|
|
542
|
-
maxRetry = this.device.
|
|
541
|
+
if (this.device.maxRetry) {
|
|
542
|
+
maxRetry = this.device.maxRetry;
|
|
543
543
|
} else {
|
|
544
544
|
maxRetry = 5;
|
|
545
545
|
}
|
|
@@ -673,6 +673,9 @@ export class Plug {
|
|
|
673
673
|
if (device.offline !== undefined) {
|
|
674
674
|
config['offline'] = device.offline;
|
|
675
675
|
}
|
|
676
|
+
if (device.maxRetry !== undefined) {
|
|
677
|
+
config['maxRetry'] = device.maxRetry;
|
|
678
|
+
}
|
|
676
679
|
if (Object.entries(config).length !== 0) {
|
|
677
680
|
this.infoLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${superStringify(config)}`);
|
|
678
681
|
}
|
|
@@ -662,8 +662,8 @@ export class RobotVacuumCleaner {
|
|
|
662
662
|
|
|
663
663
|
async maxRetry(): Promise<number> {
|
|
664
664
|
let maxRetry: number;
|
|
665
|
-
if (this.device.
|
|
666
|
-
maxRetry = this.device.
|
|
665
|
+
if (this.device.maxRetry) {
|
|
666
|
+
maxRetry = this.device.maxRetry;
|
|
667
667
|
} else {
|
|
668
668
|
maxRetry = 5;
|
|
669
669
|
}
|
|
@@ -802,6 +802,9 @@ export class RobotVacuumCleaner {
|
|
|
802
802
|
if (device.offline !== undefined) {
|
|
803
803
|
config['offline'] = device.offline;
|
|
804
804
|
}
|
|
805
|
+
if (device.maxRetry !== undefined) {
|
|
806
|
+
config['maxRetry'] = device.maxRetry;
|
|
807
|
+
}
|
|
805
808
|
if (Object.entries(config).length !== 0) {
|
|
806
809
|
this.infoLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${superStringify(config)}`);
|
|
807
810
|
}
|
package/src/device/striplight.ts
CHANGED
|
@@ -903,8 +903,8 @@ export class StripLight {
|
|
|
903
903
|
|
|
904
904
|
async maxRetry(): Promise<number> {
|
|
905
905
|
let maxRetry: number;
|
|
906
|
-
if (this.device.
|
|
907
|
-
maxRetry = this.device.
|
|
906
|
+
if (this.device.maxRetry) {
|
|
907
|
+
maxRetry = this.device.maxRetry;
|
|
908
908
|
} else {
|
|
909
909
|
maxRetry = 5;
|
|
910
910
|
}
|
|
@@ -1074,6 +1074,9 @@ export class StripLight {
|
|
|
1074
1074
|
if (device.offline !== undefined) {
|
|
1075
1075
|
config['offline'] = device.offline;
|
|
1076
1076
|
}
|
|
1077
|
+
if (device.maxRetry !== undefined) {
|
|
1078
|
+
config['maxRetry'] = device.maxRetry;
|
|
1079
|
+
}
|
|
1077
1080
|
if (Object.entries(config).length !== 0) {
|
|
1078
1081
|
this.infoLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${superStringify(config)}`);
|
|
1079
1082
|
}
|
package/src/settings.ts
CHANGED
|
@@ -54,6 +54,7 @@ export interface devicesConfig extends device {
|
|
|
54
54
|
scanDuration?: number;
|
|
55
55
|
hide_device?: boolean;
|
|
56
56
|
offline?: boolean;
|
|
57
|
+
maxRetry?: number;
|
|
57
58
|
mqttURL?: string;
|
|
58
59
|
mqttOptions?: IClientOptions;
|
|
59
60
|
mqttPubOptions?: IClientOptions;
|
|
@@ -81,7 +82,6 @@ export type bot = {
|
|
|
81
82
|
doublePress?: number;
|
|
82
83
|
pushRatePress?: number;
|
|
83
84
|
allowPush?: boolean;
|
|
84
|
-
maxRetry?: number;
|
|
85
85
|
multiPress?: boolean;
|
|
86
86
|
};
|
|
87
87
|
|