homebridge-zwave-usb 2.8.4 → 2.8.5
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.
|
@@ -42,6 +42,11 @@ class ZWaveAccessory {
|
|
|
42
42
|
const nodeName = this.node.name || this.node.deviceConfig?.label || `Node ${this.node.nodeId}`;
|
|
43
43
|
if (existingAccessory) {
|
|
44
44
|
this.platformAccessory = existingAccessory;
|
|
45
|
+
// Proactively sync name for cached accessories
|
|
46
|
+
if (this.platformAccessory.displayName !== nodeName) {
|
|
47
|
+
this.platform.log.info(`Updating cached accessory name for Node ${this.node.nodeId}: ${this.platformAccessory.displayName} -> ${nodeName}`);
|
|
48
|
+
this.platformAccessory.displayName = nodeName;
|
|
49
|
+
}
|
|
45
50
|
}
|
|
46
51
|
else {
|
|
47
52
|
this.platform.log.info(`Creating new accessory for ${nodeName} (UUID: ${uuid})`);
|
|
@@ -62,6 +67,7 @@ class ZWaveAccessory {
|
|
|
62
67
|
if (!infoService.testCharacteristic(this.platform.Characteristic.Name)) {
|
|
63
68
|
infoService.addOptionalCharacteristic(this.platform.Characteristic.Name);
|
|
64
69
|
}
|
|
70
|
+
// Update authoritative name immediately
|
|
65
71
|
infoService.updateCharacteristic(this.platform.Characteristic.Name, nodeName);
|
|
66
72
|
/**
|
|
67
73
|
* Helper to normalize UUIDs for reliable comparison during metadata pruning.
|
|
@@ -28,6 +28,8 @@ class BaseFeature {
|
|
|
28
28
|
const serviceName = this.endpoint.index > 0 ? `${newName} ${this.endpoint.index}` : newName;
|
|
29
29
|
this.platform.log.debug(`Feature Rename [Node ${this.node.nodeId}]: Updating ${this.managedServices.length} services to "${serviceName}"`);
|
|
30
30
|
for (const service of this.managedServices) {
|
|
31
|
+
// Sync internal property
|
|
32
|
+
service.displayName = serviceName;
|
|
31
33
|
if (service.testCharacteristic(this.platform.Characteristic.Name)) {
|
|
32
34
|
service.updateCharacteristic(this.platform.Characteristic.Name, serviceName);
|
|
33
35
|
}
|
|
@@ -81,6 +83,8 @@ class BaseFeature {
|
|
|
81
83
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
82
84
|
this.accessory.addService(new serviceType(serviceName));
|
|
83
85
|
}
|
|
86
|
+
// Sync internal property
|
|
87
|
+
service.displayName = serviceName;
|
|
84
88
|
// Mark the first functional service as primary to help HomeKit with naming/tiles
|
|
85
89
|
if (this.managedServices.length === 0) {
|
|
86
90
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-zwave-usb",
|
|
3
3
|
"displayName": "Homebridge Z-Wave USB",
|
|
4
|
-
"version": "2.8.
|
|
4
|
+
"version": "2.8.5",
|
|
5
5
|
"description": "A Homebridge dynamic platform plugin for Z-Wave USB controllers using zwave-js.",
|
|
6
6
|
"license": "Polyform-Noncommercial-1.0.0",
|
|
7
7
|
"funding": {
|