@switchbot/homebridge-switchbot 5.0.0-beta.111 → 5.0.0-beta.112
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/dist/homebridge-ui/public/css/styles.css +111 -16
- package/dist/homebridge-ui/public/index.html +34 -60
- package/dist/homebridge-ui/public/js/app.js +103 -41
- package/dist/homebridge-ui/public/js/app.js.map +3 -3
- package/dist/homebridge-ui/public/js/discovery.d.ts.map +1 -1
- package/dist/homebridge-ui/public/js/discovery.js +24 -1
- package/dist/homebridge-ui/public/js/discovery.js.map +1 -1
- package/dist/homebridge-ui/public/js/discovery.ts +25 -1
- package/dist/homebridge-ui/public/js/render.d.ts.map +1 -1
- package/dist/homebridge-ui/public/js/render.js +78 -35
- package/dist/homebridge-ui/public/js/render.js.map +1 -1
- package/dist/homebridge-ui/public/js/render.ts +79 -35
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +1 -6
- package/dist/platform.js.map +1 -1
- package/docs/variables/default.html +1 -1
- package/package.json +9 -8
- package/src/homebridge-ui/public/css/styles.css +111 -16
- package/src/homebridge-ui/public/index.html +34 -60
- package/src/homebridge-ui/public/js/discovery.ts +25 -1
- package/src/homebridge-ui/public/js/render.ts +79 -35
- package/src/platform.ts +1 -6
- package/test/e2e/run-e2e.spec.ts +12 -10
- package/test/helpers/matter-harness.ts +2 -2
- package/todo/COMPLETED.md +13 -0
- package/switchbot-homebridge-switchbot-5.0.0.tgz +0 -0
package/todo/COMPLETED.md
CHANGED
|
@@ -181,6 +181,19 @@ This file tracks all completed features and improvements for the SwitchBot Homeb
|
|
|
181
181
|
|
|
182
182
|
## Bug Fixes & Technical Debt
|
|
183
183
|
|
|
184
|
+
### Fix Discovery Not Showing Devices ✅ COMPLETED
|
|
185
|
+
|
|
186
|
+
- [x] **Issue:** No devices appear in discovery results after clicking "Discover Devices"
|
|
187
|
+
- [x] **Root Cause:** Discovery UI cleared the `#discoveredList` div (including the `<ul id="discoveredDevices">` element), but then tried to replace a non-existent element when rendering discovered devices
|
|
188
|
+
- [x] **Effect:** `document.getElementById('discoveredDevices')?.replaceWith(ul)` silently failed due to optional chaining, leaving the list empty
|
|
189
|
+
|
|
190
|
+
**Implementation:**
|
|
191
|
+
- Modified `discoverDevices()` in `discovery.ts` to create a new `<ul id="discoveredDevices">` container if it doesn't exist after clearing controls
|
|
192
|
+
- Updated `updateDiscoveryView()` to check if the element exists before using `replaceWith()`, with fallback to append if element is missing
|
|
193
|
+
- Added proper element lifecycle management for discovery list rendering
|
|
194
|
+
|
|
195
|
+
**Status:** Discovery now properly displays all discovered devices. Devices appear correctly with filters, sorting, and duplicate detection badges.
|
|
196
|
+
|
|
184
197
|
### Fix lint & lint:fix scripts ✅ COMPLETED
|
|
185
198
|
|
|
186
199
|
- [x] Update ESLint configuration to include `src/homebridge-ui/**/*.ts` files
|
|
Binary file
|