homebridge-slwf-01pro 0.3.1 → 0.3.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/CHANGELOG.md CHANGED
@@ -7,6 +7,42 @@ This package is a maintained fork of [`homebridge-esphome-ac`](https://github.co
7
7
 
8
8
  ---
9
9
 
10
+ ## [0.3.2] — 2026-05-06
11
+
12
+ Config-schema polish + a regression-prevention test suite for the Homebridge UI form.
13
+
14
+ ### Fixed
15
+
16
+ - **`config.schema.json` `name` default was stale** — `"ESPHomeAC"` left over from before the 0.2.0 platform rename to `SLWFOnePro`. New users adding the plugin via the Homebridge UI got a confusing log prefix that didn't match the platform identifier. Now defaults to `"SLWFOnePro"`.
17
+ - **`headerDisplay` and `footerDisplay`** rewritten to mention the SLWF brand explicitly and link to the maintainer + upstream.
18
+
19
+ ### Added
20
+
21
+ - **`test/unit/configSchema.test.js`** — 12 new tests (100 total now, up from 87) that automatically catch any future drift between the schema and the plugin code:
22
+ - Schema parses as valid JSON
23
+ - `pluginAlias` matches `PLATFORM_NAME` in `index.js` (won't silently rebrand the UI alias without rebranding the actual plugin)
24
+ - Every property in `schema.properties` is read by `index.js` (no dead schema fields the UI exposes but the plugin ignores)
25
+ - Per-device disable flags match platform-level disable flags 1:1 (so toggling a flag in the UI maps to a real code path)
26
+ - Layout references resolve to actual property keys (no typo'd field references in the form definition)
27
+ - `discoveryTimeout` condition references `autoDiscover` (so the field correctly hides when auto-discovery is off)
28
+ - All boolean disable flags default to `false`
29
+ - `name` default matches the platform identifier
30
+ - `discoveryTimeout` and `port` numeric constraints are sane
31
+
32
+ ### Why this matters
33
+
34
+ The Homebridge UI form is rendered directly from `config.schema.json` by `homebridge-config-ui-x`. A typo, stale default, or unreferenced field shows up as a confused user not as a runtime error — the plugin still works, but the user's clicks don't end up where they think. The new tests fail CI if the schema drifts from the code, eliminating that whole class of silent UI bugs.
35
+
36
+ ### Verifying the UI is writing your config correctly
37
+
38
+ After saving in the Homebridge UI, run:
39
+ ```bash
40
+ sudo cat /var/lib/homebridge/config.json | jq '.platforms[] | select(.platform == "SLWFOnePro")'
41
+ ```
42
+ You should see the JSON block matching what you toggled in the UI. If you toggled `disableHumiditySensor` ON for one device, expect `"disableHumiditySensor": true` under that device's block. If a UI toggle doesn't appear in this output, the UI didn't persist it.
43
+
44
+ ---
45
+
10
46
  ## [0.3.1] — 2026-05-06
11
47
 
12
48
  Hotfix for "Out of compliance" error when adding the bridge to Apple Home.
@@ -2,15 +2,15 @@
2
2
  "pluginAlias": "SLWFOnePro",
3
3
  "pluginType": "platform",
4
4
  "singular": true,
5
- "headerDisplay": "Homebridge plugin for ESPHome AC controllers (SLWF-01Pro Wi-Fi dongle and other ESPHome `Climate` entities). Supports auto-discovery, humidity / outdoor-temperature / power sensors, beeper / display switches, and DRY / FAN_ONLY mode tiles.",
6
- "footerDisplay": "Original by @nitaybz; SLWF-01Pro fork by @nookied.",
5
+ "headerDisplay": "Homebridge plugin for the **SMLIGHT SLWF-01Pro** Wi-Fi dongle and other ESPHome `Climate` entities. Supports mDNS auto-discovery, multi-entity bundling (humidity / outdoor temperature / power sensors, Beeper / Display switches, DRY / FAN_ONLY mode tiles).",
6
+ "footerDisplay": "Maintained fork by [@nookied](https://github.com/nookied/homebridge-SLWF-01Pro). Based on `homebridge-esphome-ac` by [@nitaybz](https://github.com/nitaybz/homebridge-esphome-ac).",
7
7
  "schema": {
8
8
  "type": "object",
9
9
  "properties": {
10
10
  "name": {
11
11
  "title": "Plugin Name (for logs)",
12
12
  "type": "string",
13
- "default": "ESPHomeAC",
13
+ "default": "SLWFOnePro",
14
14
  "required": false
15
15
  },
16
16
  "debug": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge-slwf-01pro",
3
3
  "description": "Homebridge plugin for the SMLIGHT SLWF-01Pro Wi-Fi dongle and other ESPHome Climate entities. Auto-discovery, multi-entity bundling, and full Midea-protocol AC support.",
4
- "version": "0.3.1",
4
+ "version": "0.3.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/nookied/homebridge-SLWF-01Pro.git"