@homebridge-plugins/homebridge-govee 11.32.1 → 11.32.2-beta.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to `@homebridge-plugins/homebridge-govee` will be documented in this file.
4
4
 
5
+ ## v11.32.2 (Pending Release)
6
+
7
+ ### Changed
8
+
9
+ - fix: implement the H7107's oscillation toggle, which threw a not-implemented error when tapped (#1334)
10
+
5
11
  ## v11.32.1 (2026-08-02)
6
12
 
7
13
  ### Changed
@@ -204,33 +204,33 @@ export default class {
204
204
 
205
205
  async internalSwingUpdate(value) {
206
206
  try {
207
+ const newValue = value ? 'on' : 'off'
207
208
  // Don't continue if the new value is the same as before
208
- if (this.cacheSwing === value) {
209
+ if (this.cacheSwing === newValue) {
209
210
  return
210
211
  }
211
212
 
212
- throw new Error('Swing mode update not implemented yet')
213
-
214
- // const newValue = value ? 'on' : 'off'
215
- // The existing cacheSwingCode might be something like aa1d0101960384000000000000000000000000a6
216
- // We need to change the third hex value to 00 for off or 01 for on
217
- // const hexValues = [
218
- // 0x3A,
219
- // 0x1D,
220
- // value ? 0x01 : 0x00,
221
- // ...this.cacheSwingCode.slice(6, 14).match(/.{1,2}/g).map(byte => Number.parseInt(byte, 16)),
222
- // ]
223
- //
224
- // await this.platform.sendDeviceUpdate(this.accessory, {
225
- // cmd: 'multiSync',
226
- // value: generateCodeFromHexValues(hexValues),
227
- // })
213
+ // The AWS code mirrors the device's own `aa1d..` oscillation report,
214
+ // carrying over the extra bytes from the last report seen (#1334).
215
+ // Mirroring a status code is not guaranteed on every model, so the
216
+ // documented OpenAPI oscillation toggle is also sent when the device
217
+ // advertises it
218
+ const tailBytes = this.cacheSwingCode
219
+ ? this.cacheSwingCode.slice(6, 14).match(/.{1,2}/g).map(byte => Number.parseInt(byte, 16))
220
+ : []
221
+ await this.platform.sendDeviceUpdate(this.accessory, {
222
+ cmd: 'ptReal',
223
+ value: generateCodeFromHexValues([0x33, 0x1D, value ? 0x01 : 0x00, ...tailBytes]),
224
+ openApi: this.accessory.context.openApiCapabilities?.oscillationToggle
225
+ ? { instance: 'oscillationToggle', capabilityType: 'devices.capabilities.toggle', value: value ? 1 : 0 }
226
+ : undefined,
227
+ })
228
228
 
229
229
  // Cache the new state and log if appropriate
230
- // if (this.cacheSwing !== newValue) {
231
- // this.cacheSwing = newValue
232
- // this.accessory.log(`${platformLang.curSwing} [${newValue}]`)
233
- // }
230
+ if (this.cacheSwing !== newValue) {
231
+ this.cacheSwing = newValue
232
+ this.accessory.log(`${platformLang.curSwing} [${newValue}]`)
233
+ }
234
234
  } catch (err) {
235
235
  // Catch any errors during the process
236
236
  this.accessory.logWarn(`${platformLang.devNotUpdated} ${parseError(err)}`)
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.32.1",
5
+ "version": "11.32.2-beta.0",
6
6
  "description": "Homebridge plugin to integrate Govee devices into HomeKit.",
7
7
  "author": {
8
8
  "name": "bwp91",