@switchbot/homebridge-switchbot 5.1.0 → 5.1.2
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/scripts/compute-version-override.cjs +51 -0
- package/CHANGELOG.md +31 -0
- package/README.md +2 -0
- package/config.schema.json +40 -1
- package/dist/SwitchBotHAPPlatform.d.ts.map +1 -1
- package/dist/SwitchBotHAPPlatform.js +35 -18
- package/dist/SwitchBotHAPPlatform.js.map +1 -1
- package/dist/device-types.d.ts.map +1 -1
- package/dist/device-types.js +10 -0
- package/dist/device-types.js.map +1 -1
- package/dist/deviceFactory.d.ts.map +1 -1
- package/dist/deviceFactory.js +5 -1
- package/dist/deviceFactory.js.map +1 -1
- package/dist/devices/genericDevice.d.ts +10 -17
- package/dist/devices/genericDevice.d.ts.map +1 -1
- package/dist/devices/genericDevice.js +125 -20
- package/dist/devices/genericDevice.js.map +1 -1
- package/dist/homebridge-ui/device-types.js +10 -0
- package/dist/homebridge-ui/device-types.js.map +1 -1
- package/dist/homebridge-ui/public/index.html +5 -0
- package/dist/homebridge-ui/public/js/advanced-settings.d.ts.map +1 -1
- package/dist/homebridge-ui/public/js/advanced-settings.js +2 -0
- package/dist/homebridge-ui/public/js/advanced-settings.js.map +1 -1
- package/dist/homebridge-ui/public/js/advanced-settings.ts +2 -0
- package/dist/homebridge-ui/public/js/app.js +20 -5
- package/dist/homebridge-ui/public/js/app.js.map +2 -2
- package/docs/assets/highlight.css +1 -1
- package/docs/assets/main.js +1 -1
- package/docs/assets/style.css +18 -3
- package/docs/hierarchy.html +26 -1
- package/docs/index.html +68 -2
- package/docs/modules.html +33 -1
- package/docs/variables/default.html +46 -3
- package/package.json +17 -16
- package/src/SwitchBotHAPPlatform.ts +35 -17
- package/src/device-types.ts +11 -0
- package/src/deviceFactory.ts +5 -1
- package/src/devices/genericDevice.ts +136 -20
- package/src/homebridge-ui/public/index.html +5 -0
- package/src/homebridge-ui/public/js/advanced-settings.ts +2 -0
- package/test/device/bot-hap.spec.ts +184 -0
- package/test/device/meter-co2.spec.ts +96 -0
- package/test/device/model-identities.spec.ts +45 -0
- package/src/device-types.js +0 -246
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
-
var __esm = (fn, res) => function __init() {
|
|
4
|
-
|
|
3
|
+
var __esm = (fn, res, err) => function __init() {
|
|
4
|
+
if (err) throw err[0];
|
|
5
|
+
try {
|
|
6
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
7
|
+
} catch (e) {
|
|
8
|
+
throw err = [e], e;
|
|
9
|
+
}
|
|
5
10
|
};
|
|
6
11
|
var __export = (target, all) => {
|
|
7
12
|
for (var name in all)
|
|
@@ -112,7 +117,7 @@ var init_toast = __esm({
|
|
|
112
117
|
}
|
|
113
118
|
});
|
|
114
119
|
|
|
115
|
-
// src/device-types.
|
|
120
|
+
// src/device-types.ts
|
|
116
121
|
function getValidDeviceTypes() {
|
|
117
122
|
const validTypes = /* @__PURE__ */ new Set();
|
|
118
123
|
for (const category of Object.values(DEVICE_TYPES)) {
|
|
@@ -147,7 +152,7 @@ function isValidDeviceType(deviceType) {
|
|
|
147
152
|
}
|
|
148
153
|
var DEVICE_TYPES, DEVICE_TYPE_NORMALIZATION_MAP;
|
|
149
154
|
var init_device_types = __esm({
|
|
150
|
-
"src/device-types.
|
|
155
|
+
"src/device-types.ts"() {
|
|
151
156
|
"use strict";
|
|
152
157
|
DEVICE_TYPES = {
|
|
153
158
|
"Window Coverings": ["Blind Tilt", "Curtain", "Curtain3", "Roller Shade"],
|
|
@@ -336,7 +341,17 @@ var init_device_types = __esm({
|
|
|
336
341
|
"lock touch": "Keypad Touch",
|
|
337
342
|
// Invalid type
|
|
338
343
|
// Additional normalization for new/unknown types from logs
|
|
339
|
-
"woplugus": "Plug Mini (US)"
|
|
344
|
+
"woplugus": "Plug Mini (US)",
|
|
345
|
+
// Product-specific identities reported by node-switchbot 5 (pySwitchbot 3.0.0 parity)
|
|
346
|
+
"woplugjp": "Plug Mini (JP)",
|
|
347
|
+
"wocurtain3": "Curtain3",
|
|
348
|
+
"wometerplus": "Meter Plus",
|
|
349
|
+
"wothpc": "Meter Pro (CO2)",
|
|
350
|
+
"woceilingpro": "Ceiling Light Pro",
|
|
351
|
+
"wolinkmini": "Hub Mini",
|
|
352
|
+
"woiosensorth": "WoIOSensor",
|
|
353
|
+
"outdoor meter": "WoIOSensor",
|
|
354
|
+
"indoor/outdoor thermo-hygrometer": "WoIOSensor"
|
|
340
355
|
// Removed duplicate keys below, only last occurrence kept
|
|
341
356
|
// 'plug mini us': 'plug mini (us)', // duplicate, removed
|
|
342
357
|
// 'plug us': 'plug mini (us)', // duplicate, removed
|