@switchbot/homebridge-switchbot 1.8.2-beta.2 → 1.9.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 +3 -1
- package/.github/ISSUE_TEMPLATE/bug-report.yml +3 -3
- package/.github/ISSUE_TEMPLATE/feature-request.yml +2 -2
- package/.github/ISSUE_TEMPLATE/support-request.yml +3 -3
- package/.github/labeler.yml +1 -1
- package/.github/workflows/codeql-analysis.yml +29 -29
- package/.github/workflows/nodejs-beta.yml +1 -1
- package/.github/workflows/prerelease-beta.js +1 -1
- package/.github/workflows/stale.yml +1 -1
- package/.prettierrc +9 -0
- package/.vscode/extensions.json +5 -0
- package/.vscode/settings.json +27 -0
- package/CHANGELOG.md +15 -0
- package/README.md +100 -99
- package/SECURITY.md +2 -2
- package/config.schema.json +9 -0
- package/dist/devices/bots.d.ts +4 -2
- package/dist/devices/bots.d.ts.map +1 -1
- package/dist/devices/bots.js +101 -86
- package/dist/devices/bots.js.map +1 -1
- package/dist/devices/colorbulb.d.ts +15 -15
- package/dist/devices/colorbulb.d.ts.map +1 -1
- package/dist/devices/colorbulb.js +60 -71
- package/dist/devices/colorbulb.js.map +1 -1
- package/dist/devices/contact.d.ts +2 -2
- package/dist/devices/contact.d.ts.map +1 -1
- package/dist/devices/contact.js +33 -31
- package/dist/devices/contact.js.map +1 -1
- package/dist/devices/curtains.d.ts +2 -2
- package/dist/devices/curtains.d.ts.map +1 -1
- package/dist/devices/curtains.js +71 -71
- package/dist/devices/curtains.js.map +1 -1
- package/dist/devices/humidifiers.d.ts +2 -2
- package/dist/devices/humidifiers.d.ts.map +1 -1
- package/dist/devices/humidifiers.js +74 -76
- package/dist/devices/humidifiers.js.map +1 -1
- package/dist/devices/meters.d.ts +2 -2
- package/dist/devices/meters.d.ts.map +1 -1
- package/dist/devices/meters.js +29 -27
- package/dist/devices/meters.js.map +1 -1
- package/dist/devices/motion.d.ts +2 -2
- package/dist/devices/motion.d.ts.map +1 -1
- package/dist/devices/motion.js +34 -32
- package/dist/devices/motion.js.map +1 -1
- package/dist/devices/plugs.d.ts +7 -7
- package/dist/devices/plugs.d.ts.map +1 -1
- package/dist/devices/plugs.js +18 -23
- package/dist/devices/plugs.js.map +1 -1
- package/dist/irdevices/airconditioners.d.ts +2 -2
- package/dist/irdevices/airconditioners.d.ts.map +1 -1
- package/dist/irdevices/airconditioners.js +36 -45
- package/dist/irdevices/airconditioners.js.map +1 -1
- package/dist/irdevices/airpurifiers.d.ts +2 -2
- package/dist/irdevices/airpurifiers.d.ts.map +1 -1
- package/dist/irdevices/airpurifiers.js +12 -17
- package/dist/irdevices/airpurifiers.js.map +1 -1
- package/dist/irdevices/cameras.d.ts +2 -2
- package/dist/irdevices/cameras.d.ts.map +1 -1
- package/dist/irdevices/cameras.js +10 -13
- package/dist/irdevices/cameras.js.map +1 -1
- package/dist/irdevices/fans.d.ts +2 -2
- package/dist/irdevices/fans.d.ts.map +1 -1
- package/dist/irdevices/fans.js +15 -17
- package/dist/irdevices/fans.js.map +1 -1
- package/dist/irdevices/lights.d.ts +2 -2
- package/dist/irdevices/lights.d.ts.map +1 -1
- package/dist/irdevices/lights.js +10 -13
- package/dist/irdevices/lights.js.map +1 -1
- package/dist/irdevices/others.d.ts +2 -2
- package/dist/irdevices/others.d.ts.map +1 -1
- package/dist/irdevices/others.js +10 -13
- package/dist/irdevices/others.js.map +1 -1
- package/dist/irdevices/tvs.d.ts +2 -2
- package/dist/irdevices/tvs.d.ts.map +1 -1
- package/dist/irdevices/tvs.js +22 -30
- package/dist/irdevices/tvs.js.map +1 -1
- package/dist/irdevices/vacuumcleaners.d.ts +2 -2
- package/dist/irdevices/vacuumcleaners.d.ts.map +1 -1
- package/dist/irdevices/vacuumcleaners.js +11 -13
- package/dist/irdevices/vacuumcleaners.js.map +1 -1
- package/dist/irdevices/waterheaters.d.ts +2 -2
- package/dist/irdevices/waterheaters.d.ts.map +1 -1
- package/dist/irdevices/waterheaters.js +10 -13
- package/dist/irdevices/waterheaters.js.map +1 -1
- package/dist/platform.d.ts +3 -3
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +19 -20
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +1 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js.map +1 -1
- package/homebridge-ui/public/index.html +231 -245
- package/homebridge-ui/server.js +2 -4
- package/nodemon.json +2 -4
- package/package.json +12 -8
- package/src/devices/bots.ts +228 -186
- package/src/devices/colorbulb.ts +90 -84
- package/src/devices/contact.ts +85 -78
- package/src/devices/curtains.ts +152 -135
- package/src/devices/humidifiers.ts +162 -137
- package/src/devices/meters.ts +76 -73
- package/src/devices/motion.ts +87 -78
- package/src/devices/plugs.ts +27 -31
- package/src/irdevices/airconditioners.ts +72 -55
- package/src/irdevices/airpurifiers.ts +22 -23
- package/src/irdevices/cameras.ts +18 -19
- package/src/irdevices/fans.ts +27 -25
- package/src/irdevices/lights.ts +18 -20
- package/src/irdevices/others.ts +18 -19
- package/src/irdevices/tvs.ts +33 -41
- package/src/irdevices/vacuumcleaners.ts +19 -19
- package/src/irdevices/waterheaters.ts +21 -31
- package/src/platform.ts +38 -40
- package/src/settings.ts +8 -18
- package/.github/PULL_REQUEST_TEMPLATE/pull_requests.md +0 -27
package/src/settings.ts
CHANGED
|
@@ -66,6 +66,7 @@ export type bot = {
|
|
|
66
66
|
mode?: string;
|
|
67
67
|
deviceType?: string;
|
|
68
68
|
doublePress?: number;
|
|
69
|
+
allowPush?: boolean;
|
|
69
70
|
};
|
|
70
71
|
|
|
71
72
|
export type humidifier = {
|
|
@@ -284,9 +285,9 @@ export type ad = {
|
|
|
284
285
|
|
|
285
286
|
export type serviceData = {
|
|
286
287
|
//Model of BLE SwitchBot Device
|
|
287
|
-
model: string
|
|
288
|
+
model: string;
|
|
288
289
|
//Model Name of BLE SwitchBot Device
|
|
289
|
-
modelName: string
|
|
290
|
+
modelName: string;
|
|
290
291
|
//Mode for Bot either Press or Switch
|
|
291
292
|
mode?: boolean;
|
|
292
293
|
//Bot State
|
|
@@ -304,9 +305,9 @@ export type serviceData = {
|
|
|
304
305
|
// Fahrenheit enabled for Meter
|
|
305
306
|
fahrenheit: boolean;
|
|
306
307
|
// Humidity level for Meter
|
|
307
|
-
humidity?: number
|
|
308
|
+
humidity?: number;
|
|
308
309
|
//Motion Detected for Contact or Motion Sensors
|
|
309
|
-
movement?: boolean
|
|
310
|
+
movement?: boolean;
|
|
310
311
|
//Motion ((lightLevel == 1) ? 'dark' : ((lightLevel == 2) ? 'bright' : 'unknown'))
|
|
311
312
|
//Contact ((lightLevel == 0) ? 'dark' : 'bright')
|
|
312
313
|
//Curtain (light sensor level (1-10))
|
|
@@ -326,18 +327,8 @@ export type temperature = {
|
|
|
326
327
|
};
|
|
327
328
|
|
|
328
329
|
export type switchbot = {
|
|
329
|
-
discover: (
|
|
330
|
-
|
|
331
|
-
{
|
|
332
|
-
duration?: any;
|
|
333
|
-
model: string;
|
|
334
|
-
quick: boolean;
|
|
335
|
-
id?: MacAddress;
|
|
336
|
-
}
|
|
337
|
-
) => Promise<any>;
|
|
338
|
-
wait: (
|
|
339
|
-
arg0: number
|
|
340
|
-
) => any;
|
|
330
|
+
discover: (arg0: { duration?: any; model: string; quick: boolean; id?: MacAddress }) => Promise<any>;
|
|
331
|
+
wait: (arg0: number) => any;
|
|
341
332
|
};
|
|
342
333
|
|
|
343
334
|
export function rgb2hs(r, g, b) {
|
|
@@ -893,5 +884,4 @@ export function m2hs(m) {
|
|
|
893
884
|
const input = Math.min(Math.max(Math.round(m), 140), 500);
|
|
894
885
|
const toReturn = table[input];
|
|
895
886
|
return [Math.round(toReturn[1]), Math.round(toReturn[0])];
|
|
896
|
-
|
|
897
|
-
}
|
|
887
|
+
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Enhancement
|
|
3
|
-
about: Contribute to Plugin through Pull Request
|
|
4
|
-
title: ''
|
|
5
|
-
labels: 'enhancement'
|
|
6
|
-
assignees: 'donavanbecker'
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
**Is your enhancement related to a problem? Please describe.**
|
|
10
|
-
|
|
11
|
-
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
|
12
|
-
|
|
13
|
-
**Describe the solution you are addding**
|
|
14
|
-
|
|
15
|
-
<!-- A clear and concise description of what you want to happen. -->
|
|
16
|
-
|
|
17
|
-
**Changes Proposed in this Pull Request**
|
|
18
|
-
|
|
19
|
-
<!-- A clear and concise description of what is being changed. -->
|
|
20
|
-
|
|
21
|
-
**Describe alternatives you've considered**
|
|
22
|
-
|
|
23
|
-
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
|
24
|
-
|
|
25
|
-
**Additional context**
|
|
26
|
-
|
|
27
|
-
<!-- Add any other context or screenshots about the feature request here. -->
|