@switchbot/homebridge-switchbot 1.8.3-beta.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.
Files changed (122) hide show
  1. package/.eslintrc +14 -45
  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 +2 -4
  12. package/.vscode/settings.json +14 -2
  13. package/CHANGELOG.md +16 -0
  14. package/README.md +100 -99
  15. package/SECURITY.md +2 -2
  16. package/config.schema.json +17 -0
  17. package/dist/devices/bots.d.ts +35 -32
  18. package/dist/devices/bots.d.ts.map +1 -1
  19. package/dist/devices/bots.js +168 -210
  20. package/dist/devices/bots.js.map +1 -1
  21. package/dist/devices/colorbulb.d.ts +35 -35
  22. package/dist/devices/colorbulb.d.ts.map +1 -1
  23. package/dist/devices/colorbulb.js +83 -108
  24. package/dist/devices/colorbulb.js.map +1 -1
  25. package/dist/devices/contact.d.ts +27 -25
  26. package/dist/devices/contact.d.ts.map +1 -1
  27. package/dist/devices/contact.js +110 -131
  28. package/dist/devices/contact.js.map +1 -1
  29. package/dist/devices/curtains.d.ts +29 -27
  30. package/dist/devices/curtains.d.ts.map +1 -1
  31. package/dist/devices/curtains.js +147 -182
  32. package/dist/devices/curtains.js.map +1 -1
  33. package/dist/devices/humidifiers.d.ts +31 -31
  34. package/dist/devices/humidifiers.d.ts.map +1 -1
  35. package/dist/devices/humidifiers.js +154 -181
  36. package/dist/devices/humidifiers.js.map +1 -1
  37. package/dist/devices/meters.d.ts +29 -28
  38. package/dist/devices/meters.d.ts.map +1 -1
  39. package/dist/devices/meters.js +98 -120
  40. package/dist/devices/meters.js.map +1 -1
  41. package/dist/devices/motion.d.ts +24 -23
  42. package/dist/devices/motion.d.ts.map +1 -1
  43. package/dist/devices/motion.js +97 -113
  44. package/dist/devices/motion.js.map +1 -1
  45. package/dist/devices/plugs.d.ts +16 -16
  46. package/dist/devices/plugs.d.ts.map +1 -1
  47. package/dist/devices/plugs.js +48 -71
  48. package/dist/devices/plugs.js.map +1 -1
  49. package/dist/index.d.ts +2 -2
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +3 -22
  52. package/dist/index.js.map +1 -1
  53. package/dist/irdevices/airconditioners.d.ts +7 -4
  54. package/dist/irdevices/airconditioners.d.ts.map +1 -1
  55. package/dist/irdevices/airconditioners.js +72 -93
  56. package/dist/irdevices/airconditioners.js.map +1 -1
  57. package/dist/irdevices/airpurifiers.d.ts +3 -3
  58. package/dist/irdevices/airpurifiers.d.ts.map +1 -1
  59. package/dist/irdevices/airpurifiers.js +32 -51
  60. package/dist/irdevices/airpurifiers.js.map +1 -1
  61. package/dist/irdevices/cameras.d.ts +3 -3
  62. package/dist/irdevices/cameras.d.ts.map +1 -1
  63. package/dist/irdevices/cameras.js +19 -26
  64. package/dist/irdevices/cameras.js.map +1 -1
  65. package/dist/irdevices/fans.d.ts +3 -3
  66. package/dist/irdevices/fans.d.ts.map +1 -1
  67. package/dist/irdevices/fans.js +35 -44
  68. package/dist/irdevices/fans.js.map +1 -1
  69. package/dist/irdevices/lights.d.ts +3 -3
  70. package/dist/irdevices/lights.d.ts.map +1 -1
  71. package/dist/irdevices/lights.js +25 -32
  72. package/dist/irdevices/lights.js.map +1 -1
  73. package/dist/irdevices/others.d.ts +3 -3
  74. package/dist/irdevices/others.d.ts.map +1 -1
  75. package/dist/irdevices/others.js +21 -29
  76. package/dist/irdevices/others.js.map +1 -1
  77. package/dist/irdevices/tvs.d.ts +3 -3
  78. package/dist/irdevices/tvs.d.ts.map +1 -1
  79. package/dist/irdevices/tvs.js +66 -89
  80. package/dist/irdevices/tvs.js.map +1 -1
  81. package/dist/irdevices/vacuumcleaners.d.ts +3 -3
  82. package/dist/irdevices/vacuumcleaners.d.ts.map +1 -1
  83. package/dist/irdevices/vacuumcleaners.js +18 -24
  84. package/dist/irdevices/vacuumcleaners.js.map +1 -1
  85. package/dist/irdevices/waterheaters.d.ts +3 -3
  86. package/dist/irdevices/waterheaters.d.ts.map +1 -1
  87. package/dist/irdevices/waterheaters.js +19 -26
  88. package/dist/irdevices/waterheaters.js.map +1 -1
  89. package/dist/platform.d.ts +10 -10
  90. package/dist/platform.d.ts.map +1 -1
  91. package/dist/platform.js +163 -233
  92. package/dist/platform.js.map +1 -1
  93. package/dist/settings.d.ts +3 -1
  94. package/dist/settings.d.ts.map +1 -1
  95. package/dist/settings.js +4 -4
  96. package/dist/settings.js.map +1 -1
  97. package/homebridge-ui/public/index.html +231 -245
  98. package/homebridge-ui/server.js +2 -4
  99. package/nodemon.json +2 -4
  100. package/package.json +17 -12
  101. package/src/devices/bots.ts +411 -854
  102. package/src/devices/colorbulb.ts +187 -408
  103. package/src/devices/contact.ts +210 -376
  104. package/src/devices/curtains.ts +288 -563
  105. package/src/devices/humidifiers.ts +291 -537
  106. package/src/devices/meters.ts +189 -331
  107. package/src/devices/motion.ts +188 -322
  108. package/src/devices/plugs.ts +88 -160
  109. package/src/index.ts +5 -5
  110. package/src/irdevices/airconditioners.ts +139 -318
  111. package/src/irdevices/airpurifiers.ts +71 -170
  112. package/src/irdevices/cameras.ts +44 -103
  113. package/src/irdevices/fans.ts +70 -165
  114. package/src/irdevices/lights.ts +49 -104
  115. package/src/irdevices/others.ts +55 -131
  116. package/src/irdevices/tvs.ts +114 -247
  117. package/src/irdevices/vacuumcleaners.ts +44 -104
  118. package/src/irdevices/waterheaters.ts +49 -121
  119. package/src/platform.ts +341 -753
  120. package/src/settings.ts +8 -11
  121. package/tsconfig.json +5 -14
  122. package/.github/PULL_REQUEST_TEMPLATE/pull_requests.md +0 -27
package/src/settings.ts CHANGED
@@ -1,23 +1,23 @@
1
- import { MacAddress, PlatformConfig } from "homebridge";
1
+ import { MacAddress, PlatformConfig } from 'homebridge';
2
2
  /**
3
3
  * This is the name of the platform that users will use to register the plugin in the Homebridge config.json
4
4
  */
5
- export const PLATFORM_NAME = "SwitchBot";
5
+ export const PLATFORM_NAME = 'SwitchBot';
6
6
 
7
7
  /**
8
8
  * This must match the name of your plugin as defined the package.json
9
9
  */
10
- export const PLUGIN_NAME = "@switchbot/homebridge-switchbot";
10
+ export const PLUGIN_NAME = '@switchbot/homebridge-switchbot';
11
11
 
12
12
  /**
13
13
  * This is the main url used to access SwitchBot API
14
14
  */
15
- export const AuthURL = "https://api.switch-bot.com";
15
+ export const AuthURL = 'https://api.switch-bot.com';
16
16
 
17
17
  /**
18
18
  * This is the main url used to access SwitchBot API
19
19
  */
20
- export const DeviceURL = "https://api.switch-bot.com/v1.0/devices";
20
+ export const DeviceURL = 'https://api.switch-bot.com/v1.0/devices';
21
21
 
22
22
  //Config
23
23
  export interface SwitchBotPlatformConfig extends PlatformConfig {
@@ -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 = {
@@ -146,6 +147,7 @@ export type set_min = {
146
147
 
147
148
  export type irair = {
148
149
  hide_automode?: boolean;
150
+ pushOn?: boolean
149
151
  };
150
152
 
151
153
  export type irtv = {
@@ -326,12 +328,7 @@ export type temperature = {
326
328
  };
327
329
 
328
330
  export type switchbot = {
329
- discover: (arg0: {
330
- duration?: any;
331
- model: string;
332
- quick: boolean;
333
- id?: MacAddress;
334
- }) => Promise<any>;
331
+ discover: (arg0: { duration?: any; model: string; quick: boolean; id?: MacAddress }) => Promise<any>;
335
332
  wait: (arg0: number) => any;
336
333
  };
337
334
 
package/tsconfig.json CHANGED
@@ -1,13 +1,8 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "ES2020",
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
- "src/"
22
- ],
23
- "exclude": [
24
- "**/*.spec.ts"
25
- ]
26
- }
15
+ "include": ["src/"],
16
+ "exclude": ["**/*.spec.ts"]
17
+ }
@@ -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. -->