@homebridge-plugins/homebridge-govee 11.34.2-beta.0 → 11.34.2-beta.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.
package/CHANGELOG.md CHANGED
@@ -8,6 +8,7 @@ All notable changes to `@homebridge-plugins/homebridge-govee` will be documented
8
8
 
9
9
  - feat: control the H1250 zones with the device's own frame, as govee ignores its toggles (#1343) (@Principe1218)
10
10
  - fix: explain in the log when zone tiles are missing because aws credentials are not set
11
+ - fix: restore debug logging when the plugin runs in a child bridge
11
12
 
12
13
  ## v11.34.1 (2026-08-06)
13
14
 
package/lib/platform.js CHANGED
@@ -55,7 +55,6 @@ export default class {
55
55
  try {
56
56
  this.api = api
57
57
  this.log = log
58
- this.isBeta = process.argv.includes('-D')
59
58
 
60
59
  // Configuration objects for accessories
61
60
  this.deviceConf = {}
@@ -111,14 +110,16 @@ export default class {
111
110
  // Log that the plugin initialisation has been successful
112
111
  this.log('%s.', platformLang.initialised)
113
112
 
114
- // Sort out some logging functions
115
- if (this.isBeta) {
116
- this.log.debug = this.log
117
- this.log.debugWarn = this.log.warn
118
- } else {
119
- this.log.debug = () => {}
120
- this.log.debugWarn = () => {}
121
- }
113
+ // Homebridge already decides whether debug lines are shown, and it gets it
114
+ // right in a child bridge too. This used to work it out for itself by
115
+ // looking for `-D` in the plugin's own process arguments, which a child
116
+ // bridge does not receive unless that bridge has its own debug setting
117
+ // turned on - so debug logging silently disappeared for anyone running the
118
+ // plugin in a child bridge with debug enabled globally.
119
+ //
120
+ // `debugWarn` has no equivalent on Homebridge's logger, so it goes out as
121
+ // a debug line too rather than being invented here.
122
+ this.log.debugWarn = (...args) => this.log.debug(...args)
122
123
 
123
124
  // Require any libraries that the plugin uses
124
125
  this.cusChar = new platformChars(this.api)
@@ -663,22 +664,21 @@ export default class {
663
664
  }
664
665
 
665
666
  applyAccessoryLogging(accessory) {
666
- if (this.isBeta) {
667
- accessory.log = msg => this.log('[%s] %s.', accessory.displayName, msg)
668
- accessory.logWarn = msg => this.log.warn('[%s] %s.', accessory.displayName, msg)
669
- accessory.logDebug = msg => this.log('[%s] %s.', accessory.displayName, msg)
670
- accessory.logDebugWarn = msg => this.log.warn('[%s] %s.', accessory.displayName, msg)
671
- } else {
672
- if (this.config.disableDeviceLogging) {
673
- accessory.log = () => {}
674
- accessory.logWarn = () => {}
675
- } else {
676
- accessory.log = msg => this.log('[%s] %s.', accessory.displayName, msg)
677
- accessory.logWarn = msg => this.log.warn('[%s] %s.', accessory.displayName, msg)
678
- }
679
- accessory.logDebug = () => {}
680
- accessory.logDebugWarn = () => {}
667
+ // Debug lines always go to Homebridge's debug logger, which prints them only
668
+ // when debug is on - so there is nothing to decide here. Working it out from
669
+ // the process arguments instead is what lost debug logging entirely for
670
+ // anyone running the plugin in a child bridge.
671
+ accessory.logDebug = msg => this.log.debug('[%s] %s.', accessory.displayName, msg)
672
+ accessory.logDebugWarn = accessory.logDebug
673
+
674
+ if (this.config.disableDeviceLogging) {
675
+ accessory.log = () => {}
676
+ accessory.logWarn = () => {}
677
+ return
681
678
  }
679
+
680
+ accessory.log = msg => this.log('[%s] %s.', accessory.displayName, msg)
681
+ accessory.logWarn = msg => this.log.warn('[%s] %s.', accessory.displayName, msg)
682
682
  }
683
683
 
684
684
  initialiseDevice(device) {
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.0",
5
+ "version": "11.34.2-beta.1",
6
6
  "description": "Homebridge plugin to integrate Govee devices into HomeKit.",
7
7
  "author": {
8
8
  "name": "bwp91",