homebridge-zwave-usb 2.9.0 → 2.9.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.
|
@@ -99,21 +99,6 @@ class ZWaveAccessory {
|
|
|
99
99
|
rename(newName) {
|
|
100
100
|
this.platform.log.info(`Syncing HomeKit name for Node ${this.node.nodeId} -> ${newName}`);
|
|
101
101
|
this.platformAccessory.displayName = newName;
|
|
102
|
-
// Update the Accessory Information Service (Standard Characteristics Only)
|
|
103
|
-
const infoService = this.platformAccessory.getService(this.platform.Service.AccessoryInformation);
|
|
104
|
-
// Update Name with NOTIFY permission to force HomeKit sync
|
|
105
|
-
if (!infoService.testCharacteristic(this.platform.Characteristic.Name)) {
|
|
106
|
-
infoService.addOptionalCharacteristic(this.platform.Characteristic.Name);
|
|
107
|
-
}
|
|
108
|
-
const nameChar = infoService.getCharacteristic(this.platform.Characteristic.Name);
|
|
109
|
-
nameChar.setProps({
|
|
110
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
111
|
-
perms: [settings_1.HAPPerm.PAIRED_READ, settings_1.HAPPerm.NOTIFY],
|
|
112
|
-
});
|
|
113
|
-
nameChar.updateValue(newName);
|
|
114
|
-
// Update the Model if it was using the generic name
|
|
115
|
-
const model = this.node.deviceConfig?.label || newName;
|
|
116
|
-
infoService.updateCharacteristic(this.platform.Characteristic.Model, model);
|
|
117
102
|
// Update all features
|
|
118
103
|
for (const feature of this.features) {
|
|
119
104
|
feature.rename(newName);
|
|
@@ -357,8 +357,6 @@ class ZWaveUsbPlatform {
|
|
|
357
357
|
const accessory = AccessoryFactory_1.AccessoryFactory.create(this, node, homeId);
|
|
358
358
|
this.zwaveAccessories.set(node.nodeId, accessory);
|
|
359
359
|
accessory.initialize(); // Initialize first to create functional services
|
|
360
|
-
// Force sync names immediately after initialization
|
|
361
|
-
accessory.rename(nodeName);
|
|
362
360
|
}
|
|
363
361
|
finally {
|
|
364
362
|
this.discoveryInFlight.delete(node.nodeId);
|
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.9.
|
|
4
|
+
"version": "2.9.1",
|
|
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": {
|