@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.
Files changed (115) hide show
  1. package/.eslintrc +3 -1
  2. package/.github/ISSUE_TEMPLATE/bug-report.yml +3 -3
  3. package/.github/ISSUE_TEMPLATE/feature-request.yml +2 -2
  4. package/.github/ISSUE_TEMPLATE/support-request.yml +3 -3
  5. package/.github/labeler.yml +1 -1
  6. package/.github/workflows/codeql-analysis.yml +29 -29
  7. package/.github/workflows/nodejs-beta.yml +1 -1
  8. package/.github/workflows/prerelease-beta.js +1 -1
  9. package/.github/workflows/stale.yml +1 -1
  10. package/.prettierrc +9 -0
  11. package/.vscode/extensions.json +5 -0
  12. package/.vscode/settings.json +27 -0
  13. package/CHANGELOG.md +15 -0
  14. package/README.md +100 -99
  15. package/SECURITY.md +2 -2
  16. package/config.schema.json +9 -0
  17. package/dist/devices/bots.d.ts +4 -2
  18. package/dist/devices/bots.d.ts.map +1 -1
  19. package/dist/devices/bots.js +101 -86
  20. package/dist/devices/bots.js.map +1 -1
  21. package/dist/devices/colorbulb.d.ts +15 -15
  22. package/dist/devices/colorbulb.d.ts.map +1 -1
  23. package/dist/devices/colorbulb.js +60 -71
  24. package/dist/devices/colorbulb.js.map +1 -1
  25. package/dist/devices/contact.d.ts +2 -2
  26. package/dist/devices/contact.d.ts.map +1 -1
  27. package/dist/devices/contact.js +33 -31
  28. package/dist/devices/contact.js.map +1 -1
  29. package/dist/devices/curtains.d.ts +2 -2
  30. package/dist/devices/curtains.d.ts.map +1 -1
  31. package/dist/devices/curtains.js +71 -71
  32. package/dist/devices/curtains.js.map +1 -1
  33. package/dist/devices/humidifiers.d.ts +2 -2
  34. package/dist/devices/humidifiers.d.ts.map +1 -1
  35. package/dist/devices/humidifiers.js +74 -76
  36. package/dist/devices/humidifiers.js.map +1 -1
  37. package/dist/devices/meters.d.ts +2 -2
  38. package/dist/devices/meters.d.ts.map +1 -1
  39. package/dist/devices/meters.js +29 -27
  40. package/dist/devices/meters.js.map +1 -1
  41. package/dist/devices/motion.d.ts +2 -2
  42. package/dist/devices/motion.d.ts.map +1 -1
  43. package/dist/devices/motion.js +34 -32
  44. package/dist/devices/motion.js.map +1 -1
  45. package/dist/devices/plugs.d.ts +7 -7
  46. package/dist/devices/plugs.d.ts.map +1 -1
  47. package/dist/devices/plugs.js +18 -23
  48. package/dist/devices/plugs.js.map +1 -1
  49. package/dist/irdevices/airconditioners.d.ts +2 -2
  50. package/dist/irdevices/airconditioners.d.ts.map +1 -1
  51. package/dist/irdevices/airconditioners.js +36 -45
  52. package/dist/irdevices/airconditioners.js.map +1 -1
  53. package/dist/irdevices/airpurifiers.d.ts +2 -2
  54. package/dist/irdevices/airpurifiers.d.ts.map +1 -1
  55. package/dist/irdevices/airpurifiers.js +12 -17
  56. package/dist/irdevices/airpurifiers.js.map +1 -1
  57. package/dist/irdevices/cameras.d.ts +2 -2
  58. package/dist/irdevices/cameras.d.ts.map +1 -1
  59. package/dist/irdevices/cameras.js +10 -13
  60. package/dist/irdevices/cameras.js.map +1 -1
  61. package/dist/irdevices/fans.d.ts +2 -2
  62. package/dist/irdevices/fans.d.ts.map +1 -1
  63. package/dist/irdevices/fans.js +15 -17
  64. package/dist/irdevices/fans.js.map +1 -1
  65. package/dist/irdevices/lights.d.ts +2 -2
  66. package/dist/irdevices/lights.d.ts.map +1 -1
  67. package/dist/irdevices/lights.js +10 -13
  68. package/dist/irdevices/lights.js.map +1 -1
  69. package/dist/irdevices/others.d.ts +2 -2
  70. package/dist/irdevices/others.d.ts.map +1 -1
  71. package/dist/irdevices/others.js +10 -13
  72. package/dist/irdevices/others.js.map +1 -1
  73. package/dist/irdevices/tvs.d.ts +2 -2
  74. package/dist/irdevices/tvs.d.ts.map +1 -1
  75. package/dist/irdevices/tvs.js +22 -30
  76. package/dist/irdevices/tvs.js.map +1 -1
  77. package/dist/irdevices/vacuumcleaners.d.ts +2 -2
  78. package/dist/irdevices/vacuumcleaners.d.ts.map +1 -1
  79. package/dist/irdevices/vacuumcleaners.js +11 -13
  80. package/dist/irdevices/vacuumcleaners.js.map +1 -1
  81. package/dist/irdevices/waterheaters.d.ts +2 -2
  82. package/dist/irdevices/waterheaters.d.ts.map +1 -1
  83. package/dist/irdevices/waterheaters.js +10 -13
  84. package/dist/irdevices/waterheaters.js.map +1 -1
  85. package/dist/platform.d.ts +3 -3
  86. package/dist/platform.d.ts.map +1 -1
  87. package/dist/platform.js +19 -20
  88. package/dist/platform.js.map +1 -1
  89. package/dist/settings.d.ts +1 -0
  90. package/dist/settings.d.ts.map +1 -1
  91. package/dist/settings.js.map +1 -1
  92. package/homebridge-ui/public/index.html +231 -245
  93. package/homebridge-ui/server.js +2 -4
  94. package/nodemon.json +2 -4
  95. package/package.json +12 -8
  96. package/src/devices/bots.ts +228 -186
  97. package/src/devices/colorbulb.ts +90 -84
  98. package/src/devices/contact.ts +85 -78
  99. package/src/devices/curtains.ts +152 -135
  100. package/src/devices/humidifiers.ts +162 -137
  101. package/src/devices/meters.ts +76 -73
  102. package/src/devices/motion.ts +87 -78
  103. package/src/devices/plugs.ts +27 -31
  104. package/src/irdevices/airconditioners.ts +72 -55
  105. package/src/irdevices/airpurifiers.ts +22 -23
  106. package/src/irdevices/cameras.ts +18 -19
  107. package/src/irdevices/fans.ts +27 -25
  108. package/src/irdevices/lights.ts +18 -20
  109. package/src/irdevices/others.ts +18 -19
  110. package/src/irdevices/tvs.ts +33 -41
  111. package/src/irdevices/vacuumcleaners.ts +19 -19
  112. package/src/irdevices/waterheaters.ts +21 -31
  113. package/src/platform.ts +38 -40
  114. package/src/settings.ts +8 -18
  115. 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
- arg0:
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. -->