@homebridge-plugins/homebridge-govee 11.36.0 → 11.36.1-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
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to `@homebridge-plugins/homebridge-govee` will be documented in this file.
4
4
 
5
+ ## v11.36.1 (Pending Release)
6
+
7
+ ### Changed
8
+
9
+ - fix: give the H1310 and R1310 ceiling fans their own handler, with the light they were missing (#1352)
10
+ - fix: scale the H1310 and R1310 fan speed to the six steps they have, not the H1370's twelve (#1352)
11
+
5
12
  ## v11.36.0 (2026-08-11)
6
13
 
7
14
  ### Changed
@@ -1,3 +1,4 @@
1
+ import { getDeviceCapabilities } from '../utils/device-capabilities.js'
1
2
  import {
2
3
  base64ToHex,
3
4
  fanSpeedToHkPercent,
@@ -15,12 +16,15 @@ import GoveeDevice from './base.js'
15
16
  /*
16
17
  Codes below were decoded from a real device's AWS status reports in
17
18
  https://github.com/homebridge-plugins/homebridge-govee/issues/1307
18
- Status aa 31 01 [speed] = fan speed (1-12)
19
+ Status aa 31 01 [speed] = fan speed (1 to the model's step count)
19
20
  Status aa 36 01 01 / aa 36 00 00 = fan power on/off
20
21
  The light reports through the standard state/brightness/kelvin fields
21
22
  (colour temperature only, 2700-6500K)
23
+
24
+ The H1310 and R1310 share this handler. They report six speeds against the
25
+ H1370's twelve, so the scale comes from the capabilities table (#1352)
22
26
  */
23
- export default class extends GoveeDevice {
27
+ export default class GoveeFanH1370 extends GoveeDevice {
24
28
  constructor(platform, accessory) {
25
29
  super(platform, accessory)
26
30
  // Set up custom variables for this device type
@@ -46,8 +50,9 @@ export default class extends GoveeDevice {
46
50
  .onSet(async value => this.internalStateUpdate(value))
47
51
  this.cacheState = this.service.getCharacteristic(this.hapChar.Active).value ? 'on' : 'off'
48
52
 
49
- // Real speed steps - HomeKit percentages map onto these
50
- this.speedSteps = 12
53
+ // Real speed steps - HomeKit percentages map onto these, and they differ
54
+ // per model, so the scale comes from the capabilities table
55
+ this.speedSteps = getDeviceCapabilities(accessory.context.gvModel).fanSpeedSteps
51
56
 
52
57
  // Add the set handler to the fan rotation speed characteristic
53
58
  this.service
@@ -16,8 +16,9 @@ import GoveeDevice from './base.js'
16
16
  H7100, H7102, H7106 -> Sleep, Nature, Custom, Auto
17
17
  H7101 -> Sleep, Nature, Turbo, Custom, Auto
18
18
  H7111 -> Sleep, Nature, Custom, Auto
19
- H1310, R1310 -> as the H7100, but its oscillation status message has
20
- never been confirmed, so it is not read back
19
+
20
+ The H1310 and R1310 were once on this handler as "the same fan". They are
21
+ not - they are ceiling fans with lights, and moved to fan-H1370 in #1352.
21
22
  */
22
23
 
23
24
  export default class GoveeFanH7100 extends GoveeDevice {
@@ -60,9 +60,15 @@ export default {
60
60
  deviceDehumidifierBasic,
61
61
  deviceDiffuserBasic,
62
62
  deviceFanBasic,
63
- deviceFanH1310: deviceFanH7100, // same fan, minus a confirmed swing status message
63
+ // Ceiling fans, not tower fans. They were on the H7100 tower fan handler,
64
+ // which is a different product entirely: Govee's own app files them under
65
+ // Indoor Lighting as "Govee Ceiling Fan", while every H71xx is Air Treatment.
66
+ // The H7100 handler builds no light at all and speaks the tower fan's speed
67
+ // codes, so an owner got a fan tile that did nothing, an oscillation control
68
+ // for a fan that cannot oscillate, and no light (#1352)
69
+ deviceFanH1310: deviceFanH1370,
64
70
  deviceFanH1370,
65
- deviceFanR1310: deviceFanH7100, // R1310 is the newer naming of the H1310
71
+ deviceFanR1310: deviceFanH1370, // R1310 is the newer naming of the H1310
66
72
  deviceFanH7100,
67
73
  deviceFanH7102: deviceFanH7100, // identical to the H7100
68
74
  deviceFanH7106: deviceFanH7100, // identical to the H7100
@@ -34,19 +34,19 @@ const modelOverrides = {
34
34
  // and only the brightness scale is fixed here (#1332)
35
35
  H6102: { bleBrightnessScale: 0x64 },
36
36
 
37
- // The H1310 ceiling fan shares the H7100's handler, but its oscillation
38
- // status message has never been confirmed to mean the same thing, so reading
39
- // it back stays off. While it is off, an owner's fan reporting one produces a
40
- // line in the log saying so - which is the evidence needed to turn this on
41
- H1310: { readsSwingStatus: false },
42
- R1310: { readsSwingStatus: false },
43
-
44
37
  // Later ice makers number their ice sizes the natural way round. The older
45
38
  // ones run the other way, small being the highest byte, so the two families
46
39
  // share a handler and differ only here
47
40
  H8121: { iceSizeAscending: true },
48
41
  H8122: { iceSizeAscending: true },
49
42
 
43
+ // The H1310 shares the H1370's ceiling fan handler but is a different
44
+ // product - Govee's own catalogue gives it goodsType 359 against the
45
+ // H1370's 368. Its owner reports six fan speeds in the app rather than
46
+ // twelve, so the two need separate scales (#1352)
47
+ H1310: { fanSpeedSteps: 6 },
48
+ R1310: { fanSpeedSteps: 6 },
49
+
50
50
  // AWS outlet uses 17/16 for on/off instead of 1/0
51
51
  H5080: { awsPowerOn: 17, awsPowerOff: 16 },
52
52
  H5083: { awsPowerOn: 17, awsPowerOff: 16 },
@@ -137,6 +137,9 @@ const defaults = {
137
137
  awsBrightnessNoScale: false,
138
138
  readsSwingStatus: true,
139
139
  iceSizeAscending: false,
140
+ // Ceiling fan speed steps. 12 is what the H1370 reports, from a real
141
+ // device's status in #1307
142
+ fanSpeedSteps: 12,
140
143
  // false for the great majority of models, which take the plain 20-byte frame.
141
144
  // 'v2' selects the AES-128-GCM transport in ble-crypto.js.
142
145
  bleEncryption: false,
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.36.0",
5
+ "version": "11.36.1-beta.1",
6
6
  "description": "Homebridge plugin to integrate Govee devices into HomeKit.",
7
7
  "author": {
8
8
  "name": "bwp91",