homebridge-ac-freedom 2.3.6 → 2.3.7

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
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.3.7
4
+
5
+ - **Fix inverted swing mode on local connection** (#1) — local Broadlink protocol uses fixation `0` = swinging and `7` = fixed; the plugin had it reversed, so the HomeKit swing toggle showed the opposite of the actual louvre state. Cloud connection was unaffected.
6
+
3
7
  ## 2.3.6
4
8
 
5
9
  - **Config UI: feature toggles redesigned** — checkboxes removed; each feature is now a colour-coded pill: bright green when enabled, muted grey when disabled
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homebridge-ac-freedom",
3
- "version": "2.3.6",
3
+ "version": "2.3.7",
4
4
  "displayName": "Homebridge AC Freedom",
5
5
  "description": "Homebridge plugin for AUX air conditioners via Broadlink (local UDP) and AUX Cloud API",
6
6
  "main": "index.js",
@@ -462,8 +462,9 @@ class AcFreedomAccessory {
462
462
  this.state.currentTemp = s.ambientTemp;
463
463
  // Normalise local fan speed → canonical cloud numbering
464
464
  this.state.fanSpeed = FAN_REMAP[s.fanSpeed] ?? FAN_SPEED.AUTO;
465
- this.state.swingV = s.verticalFixation === 7;
466
- this.state.swingH = s.horizontalFixation === 7;
465
+ // Local fixation: 0 = swinging, 7 = fixed
466
+ this.state.swingV = s.verticalFixation === 0;
467
+ this.state.swingH = s.horizontalFixation === 0;
467
468
  this.state.sleep = !!s.sleep;
468
469
  this.state.health = !!s.health;
469
470
  this.state.eco = !!s.mildew;
@@ -613,8 +614,9 @@ class AcFreedomAccessory {
613
614
  return this._send(
614
615
  () => {
615
616
  const a = this._localApi;
616
- a.state.verticalFixation = v ? 7 : 0;
617
- a.state.horizontalFixation = h ? 7 : 0;
617
+ // Local fixation: 0 = swinging, 7 = fixed
618
+ a.state.verticalFixation = v ? 0 : 7;
619
+ a.state.horizontalFixation = h ? 0 : 7;
618
620
  return a.setState();
619
621
  },
620
622
  () => this.cloudSet({ [CLOUD.SWING_V]: v ? 1 : 0, [CLOUD.SWING_H]: h ? 1 : 0 }),