homebridge-ac-freedom 2.0.9 → 2.1.1

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,9 +1,14 @@
1
1
  # Changelog
2
2
 
3
- ## 2.0.8
3
+ ## 2.1.1
4
4
 
5
- - Add Fan toggle to config UI — can be enabled/disabled like preset switches
6
- - Revert removeService behavior (switches properly removed when disabled)
5
+ - Mark plugin as compatible with Homebridge v2
6
+
7
+ ## 2.1.0
8
+
9
+ - Clean up codebase: remove dead code, unused exports, empty config fields
10
+ - Set `singular: true` (single platform instance)
11
+ - Add Fan toggle to config UI
7
12
 
8
13
  ## 2.0.3
9
14
 
package/README.md CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  # homebridge-ac-freedom
6
6
 
7
+ [![verified-by-homebridge](https://img.shields.io/badge/homebridge-verified-blueviolet?color=%23491F59&style=flat&logoColor=%23FFFFFF&logo=homebridge)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
7
8
  [![npm](https://img.shields.io/npm/v/homebridge-ac-freedom)](https://www.npmjs.com/package/homebridge-ac-freedom)
8
9
  [![npm](https://img.shields.io/npm/dt/homebridge-ac-freedom)](https://www.npmjs.com/package/homebridge-ac-freedom)
9
10
  [![GitHub](https://img.shields.io/github/license/azadaydinli/homebridge-ac-freedom)](https://github.com/azadaydinli/homebridge-ac-freedom/blob/main/LICENSE)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "pluginAlias": "AcFreedom",
3
3
  "pluginType": "platform",
4
- "singular": false,
4
+ "singular": true,
5
5
  "headerDisplay": "AUX Air Conditioner control via Broadlink (local) or AUX Cloud API.",
6
6
  "schema": {
7
7
  "type": "object",
package/package.json CHANGED
@@ -1,12 +1,10 @@
1
1
  {
2
2
  "name": "homebridge-ac-freedom",
3
- "version": "2.0.9",
3
+ "version": "2.1.1",
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",
7
- "scripts": {
8
- "lint": "eslint src/"
9
- },
7
+ "scripts": {},
10
8
  "keywords": [
11
9
  "homebridge-plugin",
12
10
  "homebridge",
@@ -26,10 +24,8 @@
26
24
  "url": "https://github.com/azadaydinli/homebridge-ac-freedom.git"
27
25
  },
28
26
  "engines": {
29
- "homebridge": ">=1.6.0",
27
+ "homebridge": ">=1.6.0 || >=2.0.0",
30
28
  "node": ">=18.0.0"
31
29
  },
32
- "dependencies": {},
33
- "devDependencies": {},
34
30
  "homepage": "https://github.com/azadaydinli/homebridge-ac-freedom"
35
31
  }
@@ -337,4 +337,4 @@ class BroadlinkAcApi {
337
337
  }
338
338
  }
339
339
 
340
- module.exports = { BroadlinkAcApi, AcState };
340
+ module.exports = { BroadlinkAcApi };
package/src/cloud-api.js CHANGED
@@ -84,11 +84,8 @@ function httpRequest(url, options, body) {
84
84
  class AuxCloudAPI {
85
85
  constructor(region = 'eu') {
86
86
  this.url = API_URLS[region] || API_URLS.eu;
87
- this.region = region;
88
87
  this.loginsession = null;
89
88
  this.userid = null;
90
- this.email = null;
91
- this.password = null;
92
89
  }
93
90
 
94
91
  _headers(extra = {}) {
@@ -115,9 +112,6 @@ class AuxCloudAPI {
115
112
 
116
113
  // ── Login ──────────────────────────────────────────────────────
117
114
  async login(email, password) {
118
- this.email = email;
119
- this.password = password;
120
-
121
115
  const ts = Date.now() / 1000;
122
116
  const shaPw = crypto.createHash('sha1')
123
117
  .update(`${password}${PASSWORD_SALT}`)