@homebridge-plugins/homebridge-govee 11.32.1 → 11.32.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 +7 -0
- package/lib/device/fan-H7107.js +31 -21
- package/package.json +1 -1
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.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
|
+
- fix: also send the H7107's oscillation command as the multiSync frame the fan itself uses, since the first shape only turned it off sometimes (#1334)
|
|
11
|
+
|
|
5
12
|
## v11.32.1 (2026-08-02)
|
|
6
13
|
|
|
7
14
|
### Changed
|
package/lib/device/fan-H7107.js
CHANGED
|
@@ -204,33 +204,43 @@ 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 ===
|
|
209
|
+
if (this.cacheSwing === newValue) {
|
|
209
210
|
return
|
|
210
211
|
}
|
|
211
212
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
//
|
|
215
|
-
//
|
|
216
|
-
//
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
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
|
+
|
|
229
|
+
// Hardware testing showed the `331d..` frame above turns oscillation ON
|
|
230
|
+
// reliably but OFF only sometimes - and the fan's own oscillation state
|
|
231
|
+
// travels as multiSync traffic, which is what the `3a`-prefixed frame
|
|
232
|
+
// belongs to. Both shapes mean the same thing, so the one the fan
|
|
233
|
+
// ignores is harmless, and one test tells us which it honours (#1334)
|
|
234
|
+
await this.platform.sendDeviceUpdate(this.accessory, {
|
|
235
|
+
cmd: 'multiSync',
|
|
236
|
+
value: generateCodeFromHexValues([0x3A, 0x1D, value ? 0x01 : 0x00, ...tailBytes]),
|
|
237
|
+
})
|
|
228
238
|
|
|
229
239
|
// Cache the new state and log if appropriate
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
240
|
+
if (this.cacheSwing !== newValue) {
|
|
241
|
+
this.cacheSwing = newValue
|
|
242
|
+
this.accessory.log(`${platformLang.curSwing} [${newValue}]`)
|
|
243
|
+
}
|
|
234
244
|
} catch (err) {
|
|
235
245
|
// Catch any errors during the process
|
|
236
246
|
this.accessory.logWarn(`${platformLang.devNotUpdated} ${parseError(err)}`)
|
package/package.json
CHANGED