@switchbot/homebridge-switchbot 1.10.0 → 1.10.1-beta.0
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/.eslintrc +15 -48
- package/.prettierrc +1 -1
- package/.vscode/extensions.json +2 -4
- package/dist/irdevices/airconditioners.js +1 -1
- package/package.json +76 -76
- package/src/irdevices/airconditioners.ts +1 -1
- package/tsconfig.json +5 -14
package/.eslintrc
CHANGED
|
@@ -6,18 +6,12 @@
|
|
|
6
6
|
"plugin:@typescript-eslint/recommended" // uses the recommended rules from the @typescript-eslint/eslint-plugin
|
|
7
7
|
],
|
|
8
8
|
"parserOptions": {
|
|
9
|
-
"ecmaVersion":
|
|
9
|
+
"ecmaVersion": 2021,
|
|
10
10
|
"sourceType": "module"
|
|
11
11
|
},
|
|
12
|
-
"ignorePatterns": [
|
|
13
|
-
"dist",
|
|
14
|
-
"server"
|
|
15
|
-
],
|
|
12
|
+
"ignorePatterns": ["dist", "server"],
|
|
16
13
|
"rules": {
|
|
17
|
-
"quotes": [
|
|
18
|
-
"warn",
|
|
19
|
-
"single"
|
|
20
|
-
],
|
|
14
|
+
"quotes": ["warn", "single"],
|
|
21
15
|
"indent": [
|
|
22
16
|
"warn",
|
|
23
17
|
2,
|
|
@@ -25,52 +19,25 @@
|
|
|
25
19
|
"SwitchCase": 1
|
|
26
20
|
}
|
|
27
21
|
],
|
|
28
|
-
"linebreak-style": [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
],
|
|
32
|
-
"semi": [
|
|
33
|
-
"warn",
|
|
34
|
-
"always"
|
|
35
|
-
],
|
|
36
|
-
"comma-dangle": [
|
|
37
|
-
"warn",
|
|
38
|
-
"always-multiline"
|
|
39
|
-
],
|
|
22
|
+
"linebreak-style": ["warn", "unix"],
|
|
23
|
+
"semi": ["warn", "always"],
|
|
24
|
+
"comma-dangle": ["warn", "always-multiline"],
|
|
40
25
|
"dot-notation": "off",
|
|
41
26
|
"eqeqeq": "warn",
|
|
42
|
-
"curly": [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
],
|
|
46
|
-
"
|
|
47
|
-
|
|
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
|
-
],
|
|
27
|
+
"curly": ["warn", "all"],
|
|
28
|
+
"brace-style": ["warn"],
|
|
29
|
+
"prefer-arrow-callback": ["warn"],
|
|
30
|
+
"max-len": ["warn", 150],
|
|
31
|
+
"no-console": ["warn"], // use the provided Homebridge log method instead
|
|
32
|
+
"no-non-null-assertion": ["off"],
|
|
33
|
+
"comma-spacing": ["error"],
|
|
65
34
|
"no-multi-spaces": [
|
|
66
35
|
"warn",
|
|
67
36
|
{
|
|
68
37
|
"ignoreEOLComments": true
|
|
69
38
|
}
|
|
70
39
|
],
|
|
71
|
-
"no-trailing-spaces": [
|
|
72
|
-
"warn"
|
|
73
|
-
],
|
|
40
|
+
"no-trailing-spaces": ["warn"],
|
|
74
41
|
"lines-between-class-members": [
|
|
75
42
|
"warn",
|
|
76
43
|
"always",
|
|
@@ -83,4 +50,4 @@
|
|
|
83
50
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
84
51
|
"@typescript-eslint/no-explicit-any": "off"
|
|
85
52
|
}
|
|
86
|
-
}
|
|
53
|
+
}
|
package/.prettierrc
CHANGED
package/.vscode/extensions.json
CHANGED
|
@@ -133,7 +133,7 @@ class AirConditioner {
|
|
|
133
133
|
* AirConditioner: "command" "highSpeed" "default" = fan speed to high
|
|
134
134
|
*/
|
|
135
135
|
async pushAirConditionerOnChanges() {
|
|
136
|
-
if (this.Active !== this.platform.Characteristic.Active.ACTIVE
|
|
136
|
+
if (this.Active !== this.platform.Characteristic.Active.ACTIVE || this.pushOn) {
|
|
137
137
|
const payload = {
|
|
138
138
|
commandType: 'command',
|
|
139
139
|
parameter: 'default',
|
package/package.json
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
"bugs": {
|
|
13
|
-
"url": "https://github.com/OpenWonderLabs/homebridge-switchbot/issues"
|
|
14
|
-
},
|
|
15
|
-
"engines": {
|
|
16
|
-
"homebridge": "^1.4.0",
|
|
17
|
-
"node": "^14.18.3 || ^16.13.2"
|
|
18
|
-
},
|
|
19
|
-
"main": "dist/index.js",
|
|
20
|
-
"scripts": {
|
|
21
|
-
"check": "npm install && npm outdated",
|
|
22
|
-
"update": "ncu -u && npm update && npm install",
|
|
23
|
-
"lint": "eslint src/**.ts",
|
|
24
|
-
"watch": "npm run build && npm link && nodemon",
|
|
25
|
-
"build": "rimraf ./dist && tsc",
|
|
26
|
-
"prepublishOnly": "npm run lint && npm run build",
|
|
27
|
-
"postpublish": "npm run clean",
|
|
28
|
-
"clean": "rimraf ./dist",
|
|
29
|
-
"test": "eslint src/**.ts"
|
|
30
|
-
},
|
|
31
|
-
"funding": [
|
|
32
|
-
{
|
|
33
|
-
"type": "Paypal",
|
|
34
|
-
"url": "https://paypal.me/donavanbecker"
|
|
2
|
+
"displayName": "Homebridge SwitchBot",
|
|
3
|
+
"name": "@switchbot/homebridge-switchbot",
|
|
4
|
+
"version": "1.10.1-beta.0",
|
|
5
|
+
"description": "The [Homebridge](https://homebridge.io) SwitchBot plugin allows you to access your [SwitchBot](https://www.switch-bot.com) device(s) from HomeKit.",
|
|
6
|
+
"author": "SwitchBot <support@wondertechlabs.com> (https://github.com/SwitchBot)",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git://github.com/OpenWonderLabs/homebridge-switchbot.git"
|
|
35
11
|
},
|
|
36
|
-
{
|
|
37
|
-
|
|
38
|
-
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/OpenWonderLabs/homebridge-switchbot/issues"
|
|
14
|
+
},
|
|
15
|
+
"engines": {
|
|
16
|
+
"homebridge": "^1.4.0",
|
|
17
|
+
"node": "^14.18.3 || ^16.13.2"
|
|
18
|
+
},
|
|
19
|
+
"main": "dist/index.js",
|
|
20
|
+
"scripts": {
|
|
21
|
+
"check": "npm install && npm outdated",
|
|
22
|
+
"update": "ncu -u && npm update && npm install",
|
|
23
|
+
"lint": "eslint src/**.ts",
|
|
24
|
+
"watch": "npm run build && npm link && nodemon",
|
|
25
|
+
"build": "rimraf ./dist && tsc",
|
|
26
|
+
"prepublishOnly": "npm run lint && npm run build",
|
|
27
|
+
"postpublish": "npm run clean",
|
|
28
|
+
"clean": "rimraf ./dist",
|
|
29
|
+
"test": "eslint src/**.ts"
|
|
30
|
+
},
|
|
31
|
+
"funding": [
|
|
32
|
+
{
|
|
33
|
+
"type": "Paypal",
|
|
34
|
+
"url": "https://paypal.me/donavanbecker"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "GitHub",
|
|
38
|
+
"url": "https://github.com/sponsors/donavanbecker"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"homebridge-plugin",
|
|
46
|
+
"switchbot",
|
|
47
|
+
"humidifier",
|
|
48
|
+
"humidity",
|
|
49
|
+
"temperature",
|
|
50
|
+
"bot",
|
|
51
|
+
"curtains",
|
|
52
|
+
"windows",
|
|
53
|
+
"ble",
|
|
54
|
+
"ir"
|
|
55
|
+
],
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@homebridge/plugin-ui-utils": "^0.0.19",
|
|
58
|
+
"axios": "^0.25.0",
|
|
59
|
+
"rxjs": "^7.5.2"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@types/node": "^17.0.10",
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
|
64
|
+
"@typescript-eslint/parser": "^5.10.0",
|
|
65
|
+
"eslint": "^8.7.0",
|
|
66
|
+
"eslint-config-prettier": "8.3.0",
|
|
67
|
+
"eslint-plugin-prettier": "4.0.0",
|
|
68
|
+
"homebridge": "^1.4.0",
|
|
69
|
+
"nodemon": "^2.0.15",
|
|
70
|
+
"npm-check-updates": "^12.2.1",
|
|
71
|
+
"prettier": "2.5.1",
|
|
72
|
+
"rimraf": "^3.0.2",
|
|
73
|
+
"ts-node": "^10.4.0",
|
|
74
|
+
"typescript": "^4.5.5",
|
|
75
|
+
"typescript-axios-wb": "^1.0.3"
|
|
76
|
+
},
|
|
77
|
+
"optionalDependencies": {
|
|
78
|
+
"node-switchbot": "^1.1.2"
|
|
39
79
|
}
|
|
40
|
-
],
|
|
41
|
-
"publishConfig": {
|
|
42
|
-
"access": "public"
|
|
43
|
-
},
|
|
44
|
-
"keywords": [
|
|
45
|
-
"homebridge-plugin",
|
|
46
|
-
"switchbot",
|
|
47
|
-
"humidifier",
|
|
48
|
-
"humidity",
|
|
49
|
-
"temperature",
|
|
50
|
-
"bot",
|
|
51
|
-
"curtains",
|
|
52
|
-
"windows",
|
|
53
|
-
"ble",
|
|
54
|
-
"ir"
|
|
55
|
-
],
|
|
56
|
-
"dependencies": {
|
|
57
|
-
"@homebridge/plugin-ui-utils": "^0.0.19",
|
|
58
|
-
"axios": "^0.25.0",
|
|
59
|
-
"rxjs": "^7.5.2"
|
|
60
|
-
},
|
|
61
|
-
"devDependencies": {
|
|
62
|
-
"@types/node": "^17.0.10",
|
|
63
|
-
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
|
64
|
-
"@typescript-eslint/parser": "^5.10.0",
|
|
65
|
-
"eslint": "^8.7.0",
|
|
66
|
-
"eslint-config-prettier": "8.3.0",
|
|
67
|
-
"eslint-plugin-prettier": "4.0.0",
|
|
68
|
-
"homebridge": "^1.4.0",
|
|
69
|
-
"nodemon": "^2.0.15",
|
|
70
|
-
"npm-check-updates": "^12.2.1",
|
|
71
|
-
"prettier": "2.5.1",
|
|
72
|
-
"rimraf": "^3.0.2",
|
|
73
|
-
"ts-node": "^10.4.0",
|
|
74
|
-
"typescript": "^4.5.5",
|
|
75
|
-
"typescript-axios-wb": "^1.0.3"
|
|
76
|
-
},
|
|
77
|
-
"optionalDependencies": {
|
|
78
|
-
"node-switchbot": "^1.1.2"
|
|
79
|
-
}
|
|
80
80
|
}
|
|
@@ -177,7 +177,7 @@ export class AirConditioner {
|
|
|
177
177
|
* AirConditioner: "command" "highSpeed" "default" = fan speed to high
|
|
178
178
|
*/
|
|
179
179
|
async pushAirConditionerOnChanges() {
|
|
180
|
-
if (this.Active !== this.platform.Characteristic.Active.ACTIVE
|
|
180
|
+
if (this.Active !== this.platform.Characteristic.Active.ACTIVE || this.pushOn) {
|
|
181
181
|
const payload = {
|
|
182
182
|
commandType: 'command',
|
|
183
183
|
parameter: 'default',
|
package/tsconfig.json
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
3
|
+
"target": "ES2021",
|
|
4
4
|
"module": "commonjs",
|
|
5
|
-
"lib": [
|
|
6
|
-
"es2015",
|
|
7
|
-
"es2016",
|
|
8
|
-
"es2017",
|
|
9
|
-
"es2018"
|
|
10
|
-
],
|
|
5
|
+
"lib": ["ES2015", "ES2016", "ES2017", "ES2018", "ES2019", "ES2020", "ES2021"],
|
|
11
6
|
"declaration": true,
|
|
12
7
|
"declarationMap": true,
|
|
13
8
|
"sourceMap": true,
|
|
@@ -17,10 +12,6 @@
|
|
|
17
12
|
"esModuleInterop": true,
|
|
18
13
|
"noImplicitAny": false
|
|
19
14
|
},
|
|
20
|
-
"include": [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"exclude": [
|
|
24
|
-
"**/*.spec.ts"
|
|
25
|
-
]
|
|
26
|
-
}
|
|
15
|
+
"include": ["src/"],
|
|
16
|
+
"exclude": ["**/*.spec.ts"]
|
|
17
|
+
}
|