@switchbot/homebridge-switchbot 4.1.3 → 4.1.4-beta.1
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/.github/npm-version-script.cjs +81 -0
- package/.github/workflows/beta-release.yml +3 -1
- package/.github/workflows/release.yml +3 -3
- package/config.schema.json +59 -59
- package/dist/device/blindtilt.js +2 -2
- 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 +1 -1
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.js +4 -4
- 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 +4 -4
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/device.js +5 -5
- 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/humidifier.js +1 -1
- 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 +3 -3
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.js +2 -2
- 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/meterpro.d.ts +5 -4
- package/dist/device/meterpro.d.ts.map +1 -1
- package/dist/device/meterpro.js +80 -12
- package/dist/device/meterpro.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 +2 -2
- 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/irdevice/airconditioner.js +3 -3
- 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/platform.d.ts.map +1 -1
- package/dist/platform.js +1 -0
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +9 -2
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +1 -0
- package/dist/settings.js.map +1 -1
- package/package.json +5 -5
- package/src/device/blindtilt.ts +2 -2
- package/src/device/bot.ts +3 -3
- package/src/device/ceilinglight.ts +1 -1
- package/src/device/colorbulb.ts +4 -4
- package/src/device/contact.ts +1 -1
- package/src/device/curtain.ts +4 -4
- package/src/device/device.ts +5 -5
- package/src/device/fan.ts +1 -1
- package/src/device/humidifier.ts +1 -1
- package/src/device/iosensor.ts +1 -1
- package/src/device/lightstrip.ts +3 -3
- package/src/device/lock.ts +2 -2
- package/src/device/meter.ts +1 -1
- package/src/device/meterplus.ts +1 -1
- package/src/device/meterpro.ts +109 -33
- package/src/device/motion.ts +1 -1
- package/src/device/plug.ts +1 -1
- package/src/device/robotvacuumcleaner.ts +2 -2
- package/src/device/waterdetector.ts +1 -1
- package/src/irdevice/airconditioner.ts +3 -3
- package/src/irdevice/airpurifier.ts +2 -2
- package/src/platform.ts +1 -0
- package/src/settings.ts +10 -2
- package/.github/workflows/dependabot.yml +0 -13
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This scripts queries the npm registry to pull out the latest version for a given tag.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const fs = require("fs");
|
|
8
|
+
const semver = require("semver");
|
|
9
|
+
const child_process = require("child_process");
|
|
10
|
+
const assert = require("assert");
|
|
11
|
+
|
|
12
|
+
const BRANCH_VERSION_PATTERN = /^([A-Za-z]*)-(\d+.\d+.\d+)$/
|
|
13
|
+
|
|
14
|
+
// Load the contents of the package.json file
|
|
15
|
+
const packageJSON = JSON.parse(fs.readFileSync("package.json", "utf8"));
|
|
16
|
+
|
|
17
|
+
let refArgument = process.argv[2];
|
|
18
|
+
let tagArgument = process.argv[3] || "latest";
|
|
19
|
+
|
|
20
|
+
if (refArgument == null) {
|
|
21
|
+
console.error("ref argument is missing");
|
|
22
|
+
console.error("Usage: npm-version-script.cjs <ref> [tag]");
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Queries the NPM registry for the latest version for the provided tag.
|
|
28
|
+
* @param tag The tag to query for.
|
|
29
|
+
* @returns {string} Returns the version.
|
|
30
|
+
*/
|
|
31
|
+
function getTagVersionFromNpm(tag) {
|
|
32
|
+
try {
|
|
33
|
+
return child_process.execSync(`npm info ${packageJSON.name} version --tag="${tag}"`).toString("utf8").trim();
|
|
34
|
+
} catch (e) {
|
|
35
|
+
throw e;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function desiredTargetVersion(ref) {
|
|
40
|
+
// ref is a GitHub action ref string
|
|
41
|
+
if (ref.startsWith("refs/pull/")) {
|
|
42
|
+
throw Error("The version script was executed inside a PR!");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
assert(ref.startsWith("refs/heads/"))
|
|
46
|
+
let branchName = ref.slice("refs/heads/".length);
|
|
47
|
+
|
|
48
|
+
let results = branchName.match(BRANCH_VERSION_PATTERN);
|
|
49
|
+
if (results != null) {
|
|
50
|
+
if (results[1] !== tagArgument) {
|
|
51
|
+
console.warn(`The base branch name (${results[1]}) differs from the tag name ${tagArgument}`);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return results[2];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// legacy mode were we use the `betaVersion` property in the package.json
|
|
58
|
+
if (branchName === "beta" && packageJSON.betaVersion) {
|
|
59
|
+
return packageJSON.betaVersion
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
throw new Error("Malformed branch name for ref: " + ref + ". Can't derive the base version. Use a branch name like: beta-x.x.x!");
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// derive the base version from the branch ref
|
|
66
|
+
const baseVersion = desiredTargetVersion(refArgument);
|
|
67
|
+
|
|
68
|
+
// query the npm registry for the latest version of the provided tag name
|
|
69
|
+
const latestReleasedVersion = getTagVersionFromNpm(tagArgument); // e.g. 0.7.0-beta.12
|
|
70
|
+
const latestReleaseBase = semver.inc(latestReleasedVersion, "patch"); // will produce 0.7.0 (removing the preid, needed for the equality check below)
|
|
71
|
+
|
|
72
|
+
let publishTag;
|
|
73
|
+
if (semver.eq(baseVersion, latestReleaseBase)) { // check if we are releasing another version for the latest beta
|
|
74
|
+
publishTag = latestReleasedVersion; // set the current latest beta to be incremented
|
|
75
|
+
} else {
|
|
76
|
+
publishTag = baseVersion; // start of with a new beta version
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// save the package.json
|
|
80
|
+
packageJSON.version = publishTag;
|
|
81
|
+
fs.writeFileSync("package.json", JSON.stringify(packageJSON, null, 2));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Beta Release
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
@@ -20,6 +20,8 @@ jobs:
|
|
|
20
20
|
publish:
|
|
21
21
|
needs: lint
|
|
22
22
|
if: ${{ github.repository == 'OpenWonderLabs/homebridge-switchbot' }}
|
|
23
|
+
permissions:
|
|
24
|
+
id-token: write
|
|
23
25
|
uses: OpenWonderLabs/.github/.github/workflows/npm-publish.yml@latest
|
|
24
26
|
with:
|
|
25
27
|
tag: 'beta'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Release
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
release:
|
|
@@ -14,9 +14,9 @@ jobs:
|
|
|
14
14
|
|
|
15
15
|
publish:
|
|
16
16
|
needs: build_and_test
|
|
17
|
-
|
|
18
17
|
if: ${{ github.repository == 'OpenWonderLabs/homebridge-switchbot' }}
|
|
19
|
-
|
|
18
|
+
permissions:
|
|
19
|
+
id-token: write
|
|
20
20
|
uses: OpenWonderLabs/.github/.github/workflows/npm-publish.yml@latest
|
|
21
21
|
secrets:
|
|
22
22
|
npm_auth_token: ${{ secrets.npm_token }}
|
package/config.schema.json
CHANGED
|
@@ -1035,7 +1035,7 @@
|
|
|
1035
1035
|
"refreshRate": {
|
|
1036
1036
|
"title": "Device Refresh Rate",
|
|
1037
1037
|
"type": "number",
|
|
1038
|
-
"placeholder":
|
|
1038
|
+
"placeholder": 5,
|
|
1039
1039
|
"condition": {
|
|
1040
1040
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Humidifier'].hide_device);"
|
|
1041
1041
|
}
|
|
@@ -1250,7 +1250,7 @@
|
|
|
1250
1250
|
"refreshRate": {
|
|
1251
1251
|
"title": "Device Refresh Rate",
|
|
1252
1252
|
"type": "number",
|
|
1253
|
-
"placeholder":
|
|
1253
|
+
"placeholder": 5,
|
|
1254
1254
|
"condition": {
|
|
1255
1255
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Hub 2'].hide_device);"
|
|
1256
1256
|
}
|
|
@@ -1560,7 +1560,7 @@
|
|
|
1560
1560
|
"refreshRate": {
|
|
1561
1561
|
"title": "Device Refresh Rate",
|
|
1562
1562
|
"type": "number",
|
|
1563
|
-
"placeholder":
|
|
1563
|
+
"placeholder": 5,
|
|
1564
1564
|
"condition": {
|
|
1565
1565
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Bot'].hide_device);"
|
|
1566
1566
|
}
|
|
@@ -1775,7 +1775,7 @@
|
|
|
1775
1775
|
"refreshRate": {
|
|
1776
1776
|
"title": "Device Refresh Rate",
|
|
1777
1777
|
"type": "number",
|
|
1778
|
-
"placeholder":
|
|
1778
|
+
"placeholder": 5,
|
|
1779
1779
|
"condition": {
|
|
1780
1780
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Meter'].hide_device);"
|
|
1781
1781
|
}
|
|
@@ -1990,7 +1990,7 @@
|
|
|
1990
1990
|
"refreshRate": {
|
|
1991
1991
|
"title": "Device Refresh Rate",
|
|
1992
1992
|
"type": "number",
|
|
1993
|
-
"placeholder":
|
|
1993
|
+
"placeholder": 5,
|
|
1994
1994
|
"condition": {
|
|
1995
1995
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['MeterPlus'].hide_device);"
|
|
1996
1996
|
}
|
|
@@ -2205,7 +2205,7 @@
|
|
|
2205
2205
|
"refreshRate": {
|
|
2206
2206
|
"title": "Device Refresh Rate",
|
|
2207
2207
|
"type": "number",
|
|
2208
|
-
"placeholder":
|
|
2208
|
+
"placeholder": 5,
|
|
2209
2209
|
"condition": {
|
|
2210
2210
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Meter Plus (JP)'].hide_device);"
|
|
2211
2211
|
}
|
|
@@ -2420,7 +2420,7 @@
|
|
|
2420
2420
|
"refreshRate": {
|
|
2421
2421
|
"title": "Device Refresh Rate",
|
|
2422
2422
|
"type": "number",
|
|
2423
|
-
"placeholder":
|
|
2423
|
+
"placeholder": 5,
|
|
2424
2424
|
"condition": {
|
|
2425
2425
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['WoIOSensor'].hide_device);"
|
|
2426
2426
|
}
|
|
@@ -2615,7 +2615,7 @@
|
|
|
2615
2615
|
"refreshRate": {
|
|
2616
2616
|
"title": "Device Refresh Rate",
|
|
2617
2617
|
"type": "number",
|
|
2618
|
-
"placeholder":
|
|
2618
|
+
"placeholder": 5,
|
|
2619
2619
|
"condition": {
|
|
2620
2620
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Water Detector'].hide_device);"
|
|
2621
2621
|
}
|
|
@@ -2818,7 +2818,7 @@
|
|
|
2818
2818
|
"refreshRate": {
|
|
2819
2819
|
"title": "Device Refresh Rate",
|
|
2820
2820
|
"type": "number",
|
|
2821
|
-
"placeholder":
|
|
2821
|
+
"placeholder": 5,
|
|
2822
2822
|
"condition": {
|
|
2823
2823
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Water Detector'].hide_device);"
|
|
2824
2824
|
}
|
|
@@ -3028,7 +3028,7 @@
|
|
|
3028
3028
|
"refreshRate": {
|
|
3029
3029
|
"title": "Device Refresh Rate",
|
|
3030
3030
|
"type": "number",
|
|
3031
|
-
"placeholder":
|
|
3031
|
+
"placeholder": 5,
|
|
3032
3032
|
"condition": {
|
|
3033
3033
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Contact Sensor'].hide_device);"
|
|
3034
3034
|
}
|
|
@@ -3314,7 +3314,7 @@
|
|
|
3314
3314
|
"refreshRate": {
|
|
3315
3315
|
"title": "Device Refresh Rate",
|
|
3316
3316
|
"type": "number",
|
|
3317
|
-
"placeholder":
|
|
3317
|
+
"placeholder": 5,
|
|
3318
3318
|
"condition": {
|
|
3319
3319
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Curtain'].hide_device);"
|
|
3320
3320
|
}
|
|
@@ -3600,7 +3600,7 @@
|
|
|
3600
3600
|
"refreshRate": {
|
|
3601
3601
|
"title": "Device Refresh Rate",
|
|
3602
3602
|
"type": "number",
|
|
3603
|
-
"placeholder":
|
|
3603
|
+
"placeholder": 5,
|
|
3604
3604
|
"condition": {
|
|
3605
3605
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Curtain3'].hide_device);"
|
|
3606
3606
|
}
|
|
@@ -3886,7 +3886,7 @@
|
|
|
3886
3886
|
"refreshRate": {
|
|
3887
3887
|
"title": "Device Refresh Rate",
|
|
3888
3888
|
"type": "number",
|
|
3889
|
-
"placeholder":
|
|
3889
|
+
"placeholder": 5,
|
|
3890
3890
|
"condition": {
|
|
3891
3891
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['WoRollerShade'].hide_device);"
|
|
3892
3892
|
}
|
|
@@ -4172,7 +4172,7 @@
|
|
|
4172
4172
|
"refreshRate": {
|
|
4173
4173
|
"title": "Device Refresh Rate",
|
|
4174
4174
|
"type": "number",
|
|
4175
|
-
"placeholder":
|
|
4175
|
+
"placeholder": 5,
|
|
4176
4176
|
"condition": {
|
|
4177
4177
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Roller Shade'].hide_device);"
|
|
4178
4178
|
}
|
|
@@ -4493,7 +4493,7 @@
|
|
|
4493
4493
|
"refreshRate": {
|
|
4494
4494
|
"title": "Device Refresh Rate",
|
|
4495
4495
|
"type": "number",
|
|
4496
|
-
"placeholder":
|
|
4496
|
+
"placeholder": 5,
|
|
4497
4497
|
"condition": {
|
|
4498
4498
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Blind Tilt'].hide_device);"
|
|
4499
4499
|
}
|
|
@@ -4673,7 +4673,7 @@
|
|
|
4673
4673
|
"refreshRate": {
|
|
4674
4674
|
"title": "Device Refresh Rate",
|
|
4675
4675
|
"type": "number",
|
|
4676
|
-
"placeholder":
|
|
4676
|
+
"placeholder": 5,
|
|
4677
4677
|
"condition": {
|
|
4678
4678
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Plug'].hide_device);"
|
|
4679
4679
|
}
|
|
@@ -4853,7 +4853,7 @@
|
|
|
4853
4853
|
"refreshRate": {
|
|
4854
4854
|
"title": "Device Refresh Rate",
|
|
4855
4855
|
"type": "number",
|
|
4856
|
-
"placeholder":
|
|
4856
|
+
"placeholder": 5,
|
|
4857
4857
|
"condition": {
|
|
4858
4858
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Plug Mini (US)'].hide_device);"
|
|
4859
4859
|
}
|
|
@@ -5033,7 +5033,7 @@
|
|
|
5033
5033
|
"refreshRate": {
|
|
5034
5034
|
"title": "Device Refresh Rate",
|
|
5035
5035
|
"type": "number",
|
|
5036
|
-
"placeholder":
|
|
5036
|
+
"placeholder": 5,
|
|
5037
5037
|
"condition": {
|
|
5038
5038
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Plug Mini (JP)'].hide_device);"
|
|
5039
5039
|
}
|
|
@@ -5227,7 +5227,7 @@
|
|
|
5227
5227
|
"refreshRate": {
|
|
5228
5228
|
"title": "Device Refresh Rate",
|
|
5229
5229
|
"type": "number",
|
|
5230
|
-
"placeholder":
|
|
5230
|
+
"placeholder": 5,
|
|
5231
5231
|
"condition": {
|
|
5232
5232
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Smart Lock'].hide_device);"
|
|
5233
5233
|
}
|
|
@@ -5421,7 +5421,7 @@
|
|
|
5421
5421
|
"refreshRate": {
|
|
5422
5422
|
"title": "Device Refresh Rate",
|
|
5423
5423
|
"type": "number",
|
|
5424
|
-
"placeholder":
|
|
5424
|
+
"placeholder": 5,
|
|
5425
5425
|
"condition": {
|
|
5426
5426
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Smart Lock Pro'].hide_device);"
|
|
5427
5427
|
}
|
|
@@ -5619,7 +5619,7 @@
|
|
|
5619
5619
|
"refreshRate": {
|
|
5620
5620
|
"title": "Device Refresh Rate",
|
|
5621
5621
|
"type": "number",
|
|
5622
|
-
"placeholder":
|
|
5622
|
+
"placeholder": 5,
|
|
5623
5623
|
"condition": {
|
|
5624
5624
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Color Bulb'].hide_device);"
|
|
5625
5625
|
}
|
|
@@ -5799,7 +5799,7 @@
|
|
|
5799
5799
|
"refreshRate": {
|
|
5800
5800
|
"title": "Device Refresh Rate",
|
|
5801
5801
|
"type": "number",
|
|
5802
|
-
"placeholder":
|
|
5802
|
+
"placeholder": 5,
|
|
5803
5803
|
"condition": {
|
|
5804
5804
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['K10+'].hide_device);"
|
|
5805
5805
|
}
|
|
@@ -5979,7 +5979,7 @@
|
|
|
5979
5979
|
"refreshRate": {
|
|
5980
5980
|
"title": "Device Refresh Rate",
|
|
5981
5981
|
"type": "number",
|
|
5982
|
-
"placeholder":
|
|
5982
|
+
"placeholder": 5,
|
|
5983
5983
|
"condition": {
|
|
5984
5984
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['K10+ Pro'].hide_device);"
|
|
5985
5985
|
}
|
|
@@ -6159,7 +6159,7 @@
|
|
|
6159
6159
|
"refreshRate": {
|
|
6160
6160
|
"title": "Device Refresh Rate",
|
|
6161
6161
|
"type": "number",
|
|
6162
|
-
"placeholder":
|
|
6162
|
+
"placeholder": 5,
|
|
6163
6163
|
"condition": {
|
|
6164
6164
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['WoSweeper'].hide_device);"
|
|
6165
6165
|
}
|
|
@@ -6339,7 +6339,7 @@
|
|
|
6339
6339
|
"refreshRate": {
|
|
6340
6340
|
"title": "Device Refresh Rate",
|
|
6341
6341
|
"type": "number",
|
|
6342
|
-
"placeholder":
|
|
6342
|
+
"placeholder": 5,
|
|
6343
6343
|
"condition": {
|
|
6344
6344
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['WoSweeperMini'].hide_device);"
|
|
6345
6345
|
}
|
|
@@ -6519,7 +6519,7 @@
|
|
|
6519
6519
|
"refreshRate": {
|
|
6520
6520
|
"title": "Device Refresh Rate",
|
|
6521
6521
|
"type": "number",
|
|
6522
|
-
"placeholder":
|
|
6522
|
+
"placeholder": 5,
|
|
6523
6523
|
"condition": {
|
|
6524
6524
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Robot Vacuum Cleaner S1'].hide_device);"
|
|
6525
6525
|
}
|
|
@@ -6699,7 +6699,7 @@
|
|
|
6699
6699
|
"refreshRate": {
|
|
6700
6700
|
"title": "Device Refresh Rate",
|
|
6701
6701
|
"type": "number",
|
|
6702
|
-
"placeholder":
|
|
6702
|
+
"placeholder": 5,
|
|
6703
6703
|
"condition": {
|
|
6704
6704
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Robot Vacuum Cleaner S1 Plus'].hide_device);"
|
|
6705
6705
|
}
|
|
@@ -6879,7 +6879,7 @@
|
|
|
6879
6879
|
"refreshRate": {
|
|
6880
6880
|
"title": "Device Refresh Rate",
|
|
6881
6881
|
"type": "number",
|
|
6882
|
-
"placeholder":
|
|
6882
|
+
"placeholder": 5,
|
|
6883
6883
|
"condition": {
|
|
6884
6884
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Robot Vacuum Cleaner S10'].hide_device);"
|
|
6885
6885
|
}
|
|
@@ -7077,7 +7077,7 @@
|
|
|
7077
7077
|
"refreshRate": {
|
|
7078
7078
|
"title": "Device Refresh Rate",
|
|
7079
7079
|
"type": "number",
|
|
7080
|
-
"placeholder":
|
|
7080
|
+
"placeholder": 5,
|
|
7081
7081
|
"condition": {
|
|
7082
7082
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Ceiling Light'].hide_device);"
|
|
7083
7083
|
}
|
|
@@ -7275,7 +7275,7 @@
|
|
|
7275
7275
|
"refreshRate": {
|
|
7276
7276
|
"title": "Device Refresh Rate",
|
|
7277
7277
|
"type": "number",
|
|
7278
|
-
"placeholder":
|
|
7278
|
+
"placeholder": 5,
|
|
7279
7279
|
"condition": {
|
|
7280
7280
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Ceiling Light Pro'].hide_device);"
|
|
7281
7281
|
}
|
|
@@ -7473,7 +7473,7 @@
|
|
|
7473
7473
|
"refreshRate": {
|
|
7474
7474
|
"title": "Device Refresh Rate",
|
|
7475
7475
|
"type": "number",
|
|
7476
|
-
"placeholder":
|
|
7476
|
+
"placeholder": 5,
|
|
7477
7477
|
"condition": {
|
|
7478
7478
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Strip Light'].hide_device);"
|
|
7479
7479
|
}
|
|
@@ -7662,7 +7662,7 @@
|
|
|
7662
7662
|
"refreshRate": {
|
|
7663
7663
|
"title": "Device Refresh Rate",
|
|
7664
7664
|
"type": "number",
|
|
7665
|
-
"placeholder":
|
|
7665
|
+
"placeholder": 5,
|
|
7666
7666
|
"condition": {
|
|
7667
7667
|
"functionBody": "return (model.options && model.options.deviceConfig && !model.options.deviceConfig['Battery Circulator Fan'].hide_device);"
|
|
7668
7668
|
}
|
|
@@ -8393,7 +8393,7 @@
|
|
|
8393
8393
|
"refreshRate": {
|
|
8394
8394
|
"title": "Device Refresh Rate",
|
|
8395
8395
|
"type": "number",
|
|
8396
|
-
"placeholder":
|
|
8396
|
+
"placeholder": 5,
|
|
8397
8397
|
"condition": {
|
|
8398
8398
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['TV'] && !model.options.irdeviceConfig['TV'].hide_device);"
|
|
8399
8399
|
}
|
|
@@ -8522,7 +8522,7 @@
|
|
|
8522
8522
|
"refreshRate": {
|
|
8523
8523
|
"title": "Device Refresh Rate",
|
|
8524
8524
|
"type": "number",
|
|
8525
|
-
"placeholder":
|
|
8525
|
+
"placeholder": 5,
|
|
8526
8526
|
"condition": {
|
|
8527
8527
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['DIY TV'] && !model.options.irdeviceConfig['DIY TV'].hide_device);"
|
|
8528
8528
|
}
|
|
@@ -8651,7 +8651,7 @@
|
|
|
8651
8651
|
"refreshRate": {
|
|
8652
8652
|
"title": "Device Refresh Rate",
|
|
8653
8653
|
"type": "number",
|
|
8654
|
-
"placeholder":
|
|
8654
|
+
"placeholder": 5,
|
|
8655
8655
|
"condition": {
|
|
8656
8656
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['Projector'] && !model.options.irdeviceConfig['Projector'].hide_device);"
|
|
8657
8657
|
}
|
|
@@ -8780,7 +8780,7 @@
|
|
|
8780
8780
|
"refreshRate": {
|
|
8781
8781
|
"title": "Device Refresh Rate",
|
|
8782
8782
|
"type": "number",
|
|
8783
|
-
"placeholder":
|
|
8783
|
+
"placeholder": 5,
|
|
8784
8784
|
"condition": {
|
|
8785
8785
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['DIY Projector'] && !model.options.irdeviceConfig['DIY Projector'].hide_device);"
|
|
8786
8786
|
}
|
|
@@ -8909,7 +8909,7 @@
|
|
|
8909
8909
|
"refreshRate": {
|
|
8910
8910
|
"title": "Device Refresh Rate",
|
|
8911
8911
|
"type": "number",
|
|
8912
|
-
"placeholder":
|
|
8912
|
+
"placeholder": 5,
|
|
8913
8913
|
"condition": {
|
|
8914
8914
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['Set Top Box'] && !model.options.irdeviceConfig['Set Top Box'].hide_device);"
|
|
8915
8915
|
}
|
|
@@ -9038,7 +9038,7 @@
|
|
|
9038
9038
|
"refreshRate": {
|
|
9039
9039
|
"title": "Device Refresh Rate",
|
|
9040
9040
|
"type": "number",
|
|
9041
|
-
"placeholder":
|
|
9041
|
+
"placeholder": 5,
|
|
9042
9042
|
"condition": {
|
|
9043
9043
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['DIY Set Top Box'] && !model.options.irdeviceConfig['DIY Set Top Box'].hide_device);"
|
|
9044
9044
|
}
|
|
@@ -9167,7 +9167,7 @@
|
|
|
9167
9167
|
"refreshRate": {
|
|
9168
9168
|
"title": "Device Refresh Rate",
|
|
9169
9169
|
"type": "number",
|
|
9170
|
-
"placeholder":
|
|
9170
|
+
"placeholder": 5,
|
|
9171
9171
|
"condition": {
|
|
9172
9172
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['IPTV'] && !model.options.irdeviceConfig['IPTV'].hide_device);"
|
|
9173
9173
|
}
|
|
@@ -9296,7 +9296,7 @@
|
|
|
9296
9296
|
"refreshRate": {
|
|
9297
9297
|
"title": "Device Refresh Rate",
|
|
9298
9298
|
"type": "number",
|
|
9299
|
-
"placeholder":
|
|
9299
|
+
"placeholder": 5,
|
|
9300
9300
|
"condition": {
|
|
9301
9301
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['DIY IPTV'] && !model.options.irdeviceConfig['DIY IPTV'].hide_device);"
|
|
9302
9302
|
}
|
|
@@ -9425,7 +9425,7 @@
|
|
|
9425
9425
|
"refreshRate": {
|
|
9426
9426
|
"title": "Device Refresh Rate",
|
|
9427
9427
|
"type": "number",
|
|
9428
|
-
"placeholder":
|
|
9428
|
+
"placeholder": 5,
|
|
9429
9429
|
"condition": {
|
|
9430
9430
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['DVD'] && !model.options.irdeviceConfig['DVD'].hide_device);"
|
|
9431
9431
|
}
|
|
@@ -9554,7 +9554,7 @@
|
|
|
9554
9554
|
"refreshRate": {
|
|
9555
9555
|
"title": "Device Refresh Rate",
|
|
9556
9556
|
"type": "number",
|
|
9557
|
-
"placeholder":
|
|
9557
|
+
"placeholder": 5,
|
|
9558
9558
|
"condition": {
|
|
9559
9559
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['DIY DVD'] && !model.options.irdeviceConfig['DIY DVD'].hide_device);"
|
|
9560
9560
|
}
|
|
@@ -9683,7 +9683,7 @@
|
|
|
9683
9683
|
"refreshRate": {
|
|
9684
9684
|
"title": "Device Refresh Rate",
|
|
9685
9685
|
"type": "number",
|
|
9686
|
-
"placeholder":
|
|
9686
|
+
"placeholder": 5,
|
|
9687
9687
|
"condition": {
|
|
9688
9688
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['Speaker'] && !model.options.irdeviceConfig['Speaker'].hide_device);"
|
|
9689
9689
|
}
|
|
@@ -9812,7 +9812,7 @@
|
|
|
9812
9812
|
"refreshRate": {
|
|
9813
9813
|
"title": "Device Refresh Rate",
|
|
9814
9814
|
"type": "number",
|
|
9815
|
-
"placeholder":
|
|
9815
|
+
"placeholder": 5,
|
|
9816
9816
|
"condition": {
|
|
9817
9817
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['DIY Speaker'] && !model.options.irdeviceConfig['DIY Speaker'].hide_device);"
|
|
9818
9818
|
}
|
|
@@ -9941,7 +9941,7 @@
|
|
|
9941
9941
|
"refreshRate": {
|
|
9942
9942
|
"title": "Device Refresh Rate",
|
|
9943
9943
|
"type": "number",
|
|
9944
|
-
"placeholder":
|
|
9944
|
+
"placeholder": 5,
|
|
9945
9945
|
"condition": {
|
|
9946
9946
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['Fan'] && !model.options.irdeviceConfig['Fan'].hide_device);"
|
|
9947
9947
|
}
|
|
@@ -10070,7 +10070,7 @@
|
|
|
10070
10070
|
"refreshRate": {
|
|
10071
10071
|
"title": "Device Refresh Rate",
|
|
10072
10072
|
"type": "number",
|
|
10073
|
-
"placeholder":
|
|
10073
|
+
"placeholder": 5,
|
|
10074
10074
|
"condition": {
|
|
10075
10075
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['DIY Fan'] && !model.options.irdeviceConfig['DIY Fan'].hide_device);"
|
|
10076
10076
|
}
|
|
@@ -10199,7 +10199,7 @@
|
|
|
10199
10199
|
"refreshRate": {
|
|
10200
10200
|
"title": "Device Refresh Rate",
|
|
10201
10201
|
"type": "number",
|
|
10202
|
-
"placeholder":
|
|
10202
|
+
"placeholder": 5,
|
|
10203
10203
|
"condition": {
|
|
10204
10204
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['Air Conditioner'] && !model.options.irdeviceConfig['Air Conditioner'].hide_device);"
|
|
10205
10205
|
}
|
|
@@ -10328,7 +10328,7 @@
|
|
|
10328
10328
|
"refreshRate": {
|
|
10329
10329
|
"title": "Device Refresh Rate",
|
|
10330
10330
|
"type": "number",
|
|
10331
|
-
"placeholder":
|
|
10331
|
+
"placeholder": 5,
|
|
10332
10332
|
"condition": {
|
|
10333
10333
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['DIY Air Conditioner'] && !model.options.irdeviceConfig['DIY Air Conditioner'].hide_device);"
|
|
10334
10334
|
}
|
|
@@ -10457,7 +10457,7 @@
|
|
|
10457
10457
|
"refreshRate": {
|
|
10458
10458
|
"title": "Device Refresh Rate",
|
|
10459
10459
|
"type": "number",
|
|
10460
|
-
"placeholder":
|
|
10460
|
+
"placeholder": 5,
|
|
10461
10461
|
"condition": {
|
|
10462
10462
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['Light'] && !model.options.irdeviceConfig['Light'].hide_device);"
|
|
10463
10463
|
}
|
|
@@ -10586,7 +10586,7 @@
|
|
|
10586
10586
|
"refreshRate": {
|
|
10587
10587
|
"title": "Device Refresh Rate",
|
|
10588
10588
|
"type": "number",
|
|
10589
|
-
"placeholder":
|
|
10589
|
+
"placeholder": 5,
|
|
10590
10590
|
"condition": {
|
|
10591
10591
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['DIY Light'] && !model.options.irdeviceConfig['DIY Light'].hide_device);"
|
|
10592
10592
|
}
|
|
@@ -10715,7 +10715,7 @@
|
|
|
10715
10715
|
"refreshRate": {
|
|
10716
10716
|
"title": "Device Refresh Rate",
|
|
10717
10717
|
"type": "number",
|
|
10718
|
-
"placeholder":
|
|
10718
|
+
"placeholder": 5,
|
|
10719
10719
|
"condition": {
|
|
10720
10720
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['Air Purifier'] && !model.options.irdeviceConfig['Air Purifier'].hide_device);"
|
|
10721
10721
|
}
|
|
@@ -10844,7 +10844,7 @@
|
|
|
10844
10844
|
"refreshRate": {
|
|
10845
10845
|
"title": "Device Refresh Rate",
|
|
10846
10846
|
"type": "number",
|
|
10847
|
-
"placeholder":
|
|
10847
|
+
"placeholder": 5,
|
|
10848
10848
|
"condition": {
|
|
10849
10849
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['DIY Air Purifier'] && !model.options.irdeviceConfig['DIY Air Purifier'].hide_device);"
|
|
10850
10850
|
}
|
|
@@ -10973,7 +10973,7 @@
|
|
|
10973
10973
|
"refreshRate": {
|
|
10974
10974
|
"title": "Device Refresh Rate",
|
|
10975
10975
|
"type": "number",
|
|
10976
|
-
"placeholder":
|
|
10976
|
+
"placeholder": 5,
|
|
10977
10977
|
"condition": {
|
|
10978
10978
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['Water Heater'] && !model.options.irdeviceConfig['Water Heater'].hide_device);"
|
|
10979
10979
|
}
|
|
@@ -11102,7 +11102,7 @@
|
|
|
11102
11102
|
"refreshRate": {
|
|
11103
11103
|
"title": "Device Refresh Rate",
|
|
11104
11104
|
"type": "number",
|
|
11105
|
-
"placeholder":
|
|
11105
|
+
"placeholder": 5,
|
|
11106
11106
|
"condition": {
|
|
11107
11107
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['DIY Water Heater'] && !model.options.irdeviceConfig['DIY Water Heater'].hide_device);"
|
|
11108
11108
|
}
|
|
@@ -11231,7 +11231,7 @@
|
|
|
11231
11231
|
"refreshRate": {
|
|
11232
11232
|
"title": "Device Refresh Rate",
|
|
11233
11233
|
"type": "number",
|
|
11234
|
-
"placeholder":
|
|
11234
|
+
"placeholder": 5,
|
|
11235
11235
|
"condition": {
|
|
11236
11236
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['Vacuum Cleaner'] && !model.options.irdeviceConfig['Vacuum Cleaner'].hide_device);"
|
|
11237
11237
|
}
|
|
@@ -11360,7 +11360,7 @@
|
|
|
11360
11360
|
"refreshRate": {
|
|
11361
11361
|
"title": "Device Refresh Rate",
|
|
11362
11362
|
"type": "number",
|
|
11363
|
-
"placeholder":
|
|
11363
|
+
"placeholder": 5,
|
|
11364
11364
|
"condition": {
|
|
11365
11365
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['DIY Vacuum Cleaner'] && !model.options.irdeviceConfig['DIY Vacuum Cleaner'].hide_device);"
|
|
11366
11366
|
}
|
|
@@ -11489,7 +11489,7 @@
|
|
|
11489
11489
|
"refreshRate": {
|
|
11490
11490
|
"title": "Device Refresh Rate",
|
|
11491
11491
|
"type": "number",
|
|
11492
|
-
"placeholder":
|
|
11492
|
+
"placeholder": 5,
|
|
11493
11493
|
"condition": {
|
|
11494
11494
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['Camera'] && !model.options.irdeviceConfig['Camera'].hide_device);"
|
|
11495
11495
|
}
|
|
@@ -11618,7 +11618,7 @@
|
|
|
11618
11618
|
"refreshRate": {
|
|
11619
11619
|
"title": "Device Refresh Rate",
|
|
11620
11620
|
"type": "number",
|
|
11621
|
-
"placeholder":
|
|
11621
|
+
"placeholder": 5,
|
|
11622
11622
|
"condition": {
|
|
11623
11623
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['DIY Camera'] && !model.options.irdeviceConfig['DIY Camera'].hide_device);"
|
|
11624
11624
|
}
|
|
@@ -11747,7 +11747,7 @@
|
|
|
11747
11747
|
"refreshRate": {
|
|
11748
11748
|
"title": "Device Refresh Rate",
|
|
11749
11749
|
"type": "number",
|
|
11750
|
-
"placeholder":
|
|
11750
|
+
"placeholder": 5,
|
|
11751
11751
|
"condition": {
|
|
11752
11752
|
"functionBody": "return (model.options && model.options.irdeviceConfig && model.options.irdeviceConfig['Others'] && !model.options.irdeviceConfig['Others'].hide_device);"
|
|
11753
11753
|
}
|
package/dist/device/blindtilt.js
CHANGED
|
@@ -281,7 +281,7 @@ export class BlindTilt extends deviceBase {
|
|
|
281
281
|
this.debugLog(`LightLevel: ${this.serviceData.lightLevel}, CurrentAmbientLightLevel: ${this.LightSensor.CurrentAmbientLightLevel}`);
|
|
282
282
|
}
|
|
283
283
|
// Battery Info
|
|
284
|
-
if (this.serviceData
|
|
284
|
+
if ('battery' in this.serviceData) {
|
|
285
285
|
// BatteryLevel
|
|
286
286
|
this.Battery.BatteryLevel = this.serviceData.battery;
|
|
287
287
|
this.debugLog(`BatteryLevel: ${this.Battery.BatteryLevel}`);
|
|
@@ -519,7 +519,7 @@ export class BlindTilt extends deviceBase {
|
|
|
519
519
|
});
|
|
520
520
|
})
|
|
521
521
|
.then(async () => {
|
|
522
|
-
this.successLog(`TargetPostion: ${this.WindowCovering.TargetPosition} sent over SwitchBot BLE,
|
|
522
|
+
this.successLog(`TargetPostion: ${this.WindowCovering.TargetPosition} sent over SwitchBot BLE, sent successfully`);
|
|
523
523
|
await this.updateHomeKitCharacteristics();
|
|
524
524
|
})
|
|
525
525
|
.catch(async (e) => {
|