homebridge-zwave-usb 2.6.0 → 2.7.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.
@@ -93,6 +93,13 @@ class ZWaveAccessory {
93
93
  if (!infoService.testCharacteristic(this.platform.Characteristic.Name)) {
94
94
  infoService.addOptionalCharacteristic(this.platform.Characteristic.Name);
95
95
  }
96
+ infoService.getCharacteristic(this.platform.Characteristic.Name)
97
+ .setProps({
98
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
99
+ format: settings_1.HAPFormat.STRING,
100
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101
+ perms: [settings_1.HAPPerm.PAIRED_READ, settings_1.HAPPerm.NOTIFY],
102
+ });
96
103
  infoService.updateCharacteristic(this.platform.Characteristic.Name, newName);
97
104
  // Update the Model and Serial if they were using the generic name
98
105
  const model = this.node.deviceConfig?.label || newName;
@@ -28,7 +28,10 @@ class BaseFeature {
28
28
  const serviceName = this.endpoint.index > 0 ? `${newName} ${this.endpoint.index}` : newName;
29
29
  for (const service of this.managedServices) {
30
30
  if (service.testCharacteristic(this.platform.Characteristic.Name)) {
31
- service.getCharacteristic(this.platform.Characteristic.Name).updateValue(serviceName);
31
+ service.updateCharacteristic(this.platform.Characteristic.Name, serviceName);
32
+ }
33
+ if (service.testCharacteristic(this.platform.Characteristic.ConfiguredName)) {
34
+ service.updateCharacteristic(this.platform.Characteristic.ConfiguredName, serviceName);
32
35
  }
33
36
  }
34
37
  }
@@ -84,7 +87,20 @@ class BaseFeature {
84
87
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
85
88
  format: settings_1.HAPFormat.STRING,
86
89
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
87
- perms: [settings_1.HAPPerm.PAIRED_READ],
90
+ perms: [settings_1.HAPPerm.PAIRED_READ, settings_1.HAPPerm.NOTIFY],
91
+ })
92
+ .updateValue(serviceName);
93
+ // Also set ConfiguredName which many HomeKit versions prioritize for plugin-side renaming
94
+ if (!service.testCharacteristic(this.platform.Characteristic.ConfiguredName)) {
95
+ service.addOptionalCharacteristic(this.platform.Characteristic.ConfiguredName);
96
+ }
97
+ service
98
+ .getCharacteristic(this.platform.Characteristic.ConfiguredName)
99
+ .setProps({
100
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101
+ format: settings_1.HAPFormat.STRING,
102
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
103
+ perms: [settings_1.HAPPerm.PAIRED_READ, settings_1.HAPPerm.NOTIFY],
88
104
  })
89
105
  .updateValue(serviceName);
90
106
  // Add Service Label Index for multi-endpoint devices to help with ordering/naming
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.6.0",
4
+ "version": "2.7.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": {