homebridge-zwave-usb 2.4.0 → 2.6.0

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.
@@ -88,11 +88,15 @@ class ZWaveAccessory {
88
88
  rename(newName) {
89
89
  this.platform.log.info(`Syncing HomeKit name for Node ${this.node.nodeId} -> ${newName}`);
90
90
  this.platformAccessory.displayName = newName;
91
+ // Update the Accessory Information Service (Most Authoritative)
92
+ const infoService = this.platformAccessory.getService(this.platform.Service.AccessoryInformation);
93
+ if (!infoService.testCharacteristic(this.platform.Characteristic.Name)) {
94
+ infoService.addOptionalCharacteristic(this.platform.Characteristic.Name);
95
+ }
96
+ infoService.updateCharacteristic(this.platform.Characteristic.Name, newName);
91
97
  // Update the Model and Serial if they were using the generic name
92
98
  const model = this.node.deviceConfig?.label || newName;
93
- this.platformAccessory
94
- .getService(this.platform.Service.AccessoryInformation)
95
- .setCharacteristic(this.platform.Characteristic.Model, model);
99
+ infoService.setCharacteristic(this.platform.Characteristic.Model, model);
96
100
  // Update all features
97
101
  for (const feature of this.features) {
98
102
  feature.rename(newName);
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.4.0",
4
+ "version": "2.6.0",
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": {