@homebridge-plugins/homebridge-govee 11.34.2-beta.2 → 11.34.2-beta.3

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
@@ -12,9 +12,11 @@ All notable changes to `@homebridge-plugins/homebridge-govee` will be documented
12
12
  - fix: turn adaptive lighting off when a colour is chosen outside HomeKit
13
13
  - fix: send a colour change when only the saturation moves, on every night light
14
14
  - fix: listen for saturation on the main light too, not only hue
15
+ fix: accept 20-byte H5106 status frames (#1345) (@danieloleary)
15
16
  - fix: stop a lan scan that cannot reach the network from crashing the bridge
16
17
  - fix: apply the openapi disable and refresh settings instead of asking for them to be removed
17
18
  - fix: say once when a bluetooth reading arrives for an unknown device, not on every broadcast
19
+ - fix: reject a refresh time so large it would make the plugin poll every millisecond
18
20
 
19
21
  ## v11.34.1 (2026-08-06)
20
22
 
@@ -49,7 +49,8 @@
49
49
  "type": "integer",
50
50
  "description": "An interval (in seconds) in which your HTTP devices will refresh with the plugin. Must be 30 or more.",
51
51
  "placeholder": 30,
52
- "minimum": 30
52
+ "minimum": 30,
53
+ "maximum": 2073600
53
54
  },
54
55
  "awsDisable": {
55
56
  "title": "Disable AWS",
@@ -69,7 +70,8 @@
69
70
  "minimum": 60,
70
71
  "condition": {
71
72
  "functionBody": "return (!model.bleDisable);"
72
- }
73
+ },
74
+ "maximum": 2073600
73
75
  },
74
76
  "lanDisable": {
75
77
  "title": "Disable LAN",
@@ -84,7 +86,8 @@
84
86
  "minimum": 10,
85
87
  "condition": {
86
88
  "functionBody": "return (!model.lanDisable);"
87
- }
89
+ },
90
+ "maximum": 2073600
88
91
  },
89
92
  "lanScanInterval": {
90
93
  "title": "LAN Scan Interval",
@@ -94,7 +97,8 @@
94
97
  "minimum": 30,
95
98
  "condition": {
96
99
  "functionBody": "return (!model.lanDisable);"
97
- }
100
+ },
101
+ "maximum": 2073600
98
102
  },
99
103
  "lanScanSubnets": {
100
104
  "title": "LAN Scan Subnets",
@@ -118,7 +122,8 @@
118
122
  "minimum": 30,
119
123
  "condition": {
120
124
  "functionBody": "return (!model.openApiDisable);"
121
- }
125
+ },
126
+ "maximum": 2073600
122
127
  },
123
128
  "bleControlInterval": {
124
129
  "title": "BLE Control Interval",
@@ -108,7 +108,7 @@ export default class extends GoveeDevice {
108
108
  case 'aa0e':
109
109
  break
110
110
  default: {
111
- if (hexParts.length < 21) {
111
+ if (hexParts.length < 20) {
112
112
  break
113
113
  }
114
114
  const tempInCen = Math.round((hexToDecimal(`0x${deviceFunction}`) + (this.accessory.context.offTemp / 100)) / 10) / 10
@@ -33,6 +33,9 @@ export function applyUserConfig(platform, config) {
33
33
  const logIncrease = (k, min) => {
34
34
  platform.log.warn('%s [%s] %s %s.', platformLang.cfgItem, k, platformLang.cfgLow, min)
35
35
  }
36
+ const logDecrease = (k, max) => {
37
+ platform.log.warn('%s [%s] %s %s.', platformLang.cfgItem, k, platformLang.cfgHigh, max)
38
+ }
36
39
  const logQuotes = (k) => {
37
40
  platform.log.warn('%s [%s] %s.', platformLang.cfgItem, k, platformLang.cfgQts)
38
41
  }
@@ -99,6 +102,9 @@ export function applyUserConfig(platform, config) {
99
102
  } else if (intVal < platformConsts.minValues[key]) {
100
103
  logIncrease(key, platformConsts.minValues[key])
101
104
  platform.config[key] = platformConsts.minValues[key]
105
+ } else if (platformConsts.maxValues[key] !== undefined && intVal > platformConsts.maxValues[key]) {
106
+ logDecrease(key, platformConsts.maxValues[key])
107
+ platform.config[key] = platformConsts.maxValues[key]
102
108
  } else {
103
109
  platform.config[key] = intVal
104
110
  }
@@ -60,6 +60,18 @@ export default {
60
60
  openApiRefreshTime: 30,
61
61
  },
62
62
 
63
+ // A Node timer holds its delay in a signed 32-bit integer. Over 2147483647 ms
64
+ // it does not throw - it quietly becomes 1 ms, so any of these set past that
65
+ // point would poll a thousand times a second rather than slowly. 2073600
66
+ // seconds is 24 days, comfortably inside the limit once multiplied up.
67
+ maxValues: {
68
+ bleRefreshTime: 2073600,
69
+ httpRefreshTime: 2073600,
70
+ lanRefreshTime: 2073600,
71
+ lanScanInterval: 2073600,
72
+ openApiRefreshTime: 2073600,
73
+ },
74
+
63
75
  allowed: {
64
76
  lightDevices: [
65
77
  'label',
@@ -34,6 +34,7 @@ export default {
34
34
  cfgIgn: 'is not configured correctly so ignoring',
35
35
  cfgIgnItem: 'has an invalid entry which will be ignored',
36
36
  cfgItem: 'Config entry',
37
+ cfgHigh: 'is set too high so reducing to',
37
38
  cfgLow: 'is set too low so increasing to',
38
39
  cfgRmv: 'is unused and can be removed',
39
40
  cfgQts: 'should not have quotes around its entry',
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.2",
5
+ "version": "11.34.2-beta.3",
6
6
  "description": "Homebridge plugin to integrate Govee devices into HomeKit.",
7
7
  "author": {
8
8
  "name": "bwp91",