@homebridge-plugins/homebridge-govee 11.34.2-beta.10 → 11.34.2-beta.11

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/CHANGELOG.md CHANGED
@@ -24,6 +24,7 @@ All notable changes to `@homebridge-plugins/homebridge-govee` will be documented
24
24
  - feat: show whether the kettle is heating, keeping warm or idle (#1337)
25
25
  - fix: give the H5106 a battery service, so its low battery setting does something
26
26
  - fix: stop a light's broadcast being mistaken for an h5101 sensor reading
27
+ - fix: follow a device renamed in the govee app, instead of keeping its first name forever (#1344)
27
28
 
28
29
  ## v11.34.1 (2026-08-06)
29
30
 
@@ -1,6 +1,7 @@
1
1
  import platformConsts from './constants.js'
2
2
  import { getDeviceCapabilities } from './device-capabilities.js'
3
3
  import { hasProperty } from './functions.js'
4
+ import platformLang from './lang-en.js'
4
5
 
5
6
  /**
6
7
  * Fills in everything a handler needs to know about a device before it is
@@ -69,9 +70,28 @@ export function applyDeviceContext(platform, accessory, device, deviceConf, join
69
70
  accessory.context.useLanControl = true
70
71
  }
71
72
 
72
- // If the device is LAN-only, then sync the display name with the label in the configuration
73
- if (device.isLanOnly) {
73
+ // Keep the name in step with Govee - or, for a LAN-only device, with the
74
+ // label in the configuration.
75
+ //
76
+ // ⚠️ This used to run for LAN-only devices only, so every other device kept
77
+ // whatever name it was discovered under, forever. Renaming in the Govee app
78
+ // did nothing, and a name HAP complains about (brackets, say) could not be
79
+ // cleared without deleting the cached accessory and losing its room and
80
+ // automations (#1344).
81
+ //
82
+ // The AccessoryInformation characteristics are set alongside displayName
83
+ // because addAccessory sets all three, and HAP's own warning reads the
84
+ // characteristic rather than the display name.
85
+ if (device.deviceName && accessory.displayName !== device.deviceName) {
86
+ platform.log('[%s] %s [%s].', accessory.displayName, platformLang.devRenamed, device.deviceName)
74
87
  accessory.displayName = device.deviceName
88
+
89
+ const hapChar = platform.api?.hap?.Characteristic
90
+ const infoService = accessory.getService?.(platform.api?.hap?.Service?.AccessoryInformation)
91
+ if (hapChar && infoService) {
92
+ infoService.updateCharacteristic(hapChar.Name, device.deviceName)
93
+ infoService.updateCharacteristic(hapChar.ConfiguredName, device.deviceName)
94
+ }
75
95
  }
76
96
 
77
97
  // See if we have extra HTTP client info for this device
@@ -82,6 +82,7 @@ export default {
82
82
  devNotRet: 'skipping sync as device status not retrievable',
83
83
  devNotUpdated: 'could not be updated as',
84
84
  devRemove: 'has been removed from Homebridge',
85
+ devRenamed: 'has been renamed to',
85
86
  disableClient: 'disabling client as',
86
87
  disabledInConfig: 'disabled in config',
87
88
  disabling: 'Disabling plugin',
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@homebridge-plugins/homebridge-govee",
3
3
  "alias": "Govee",
4
4
  "type": "module",
5
- "version": "11.34.2-beta.10",
5
+ "version": "11.34.2-beta.11",
6
6
  "description": "Homebridge plugin to integrate Govee devices into HomeKit.",
7
7
  "author": {
8
8
  "name": "bwp91",