@smarterhomeapp/homebridge-vantage 1.0.3 → 1.0.4
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/vantageInfusion.js +6 -0
- package/package.json +14 -14
package/dist/vantageInfusion.js
CHANGED
|
@@ -295,6 +295,7 @@ class VantageInfusion extends events_1.EventEmitter {
|
|
|
295
295
|
const rangeStr = (this.opts.range || '0,999999999').replace(/\s+/g, '');
|
|
296
296
|
const [minVID, maxVID] = rangeStr.split(',').map((x) => Number.parseInt(x, 10));
|
|
297
297
|
const blindOpenClose = {};
|
|
298
|
+
const seenNames = new Set();
|
|
298
299
|
for (const raw of objects) {
|
|
299
300
|
const key = Object.keys(raw)[0];
|
|
300
301
|
const it = raw[key];
|
|
@@ -311,6 +312,11 @@ class VantageInfusion extends events_1.EventEmitter {
|
|
|
311
312
|
if (it.Area && Area[it.Area]?.Name)
|
|
312
313
|
name = `${Area[it.Area].Name} ${name}`;
|
|
313
314
|
name = name.replace(/-/g, '') || `VID${vid}`;
|
|
315
|
+
const nameKey = name.toLowerCase();
|
|
316
|
+
if (seenNames.has(nameKey)) {
|
|
317
|
+
name = `${name} VID${vid}`;
|
|
318
|
+
}
|
|
319
|
+
seenNames.add(name.toLowerCase());
|
|
314
320
|
const pushUnique = (dev) => {
|
|
315
321
|
if (devices.find((d) => d.vid === vid))
|
|
316
322
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smarterhomeapp/homebridge-vantage",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Homebridge plugin for Vantage InFusion (dynamic platform, HB 1.6+ / 2.0 ready)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"homepage": "https://github.com/SmarterHomeApp/homebridge-vantage",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
|
-
"url": "https://github.com/SmarterHomeApp/homebridge-vantage.git"
|
|
18
|
+
"url": "git+https://github.com/SmarterHomeApp/homebridge-vantage.git"
|
|
19
19
|
},
|
|
20
20
|
"bugs": {
|
|
21
21
|
"url": "https://github.com/SmarterHomeApp/homebridge-vantage/issues"
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"lint": "eslint 'src/**/*.{ts,tsx}'",
|
|
40
40
|
"prepublishOnly": "npm run build"
|
|
41
41
|
},
|
|
42
|
-
"dependencies": {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"sprintf-js": "^1.1.3",
|
|
44
|
+
"xml2js": "^0.6.2"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/xml2js": "^0.4.14",
|
|
48
|
+
"homebridge": "^1.11.0",
|
|
49
|
+
"typescript": "^5.5.4",
|
|
50
|
+
"eslint": "^9.12.0",
|
|
51
|
+
"@types/node": "^20.19.11",
|
|
52
|
+
"rimraf": "^6.0.1"
|
|
53
|
+
}
|
|
54
54
|
}
|