@homebridge-plugins/homebridge-govee 11.33.1 → 11.33.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 +6 -0
- package/lib/device/fan-H7105.js +31 -22
- package/package.json +1 -1
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.33.2 (Pending Release)
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- fix: implement the H7105 oscillation toggle, which threw a not-implemented error (#1339)
|
|
10
|
+
|
|
5
11
|
## v11.33.1 (2026-08-04)
|
|
6
12
|
|
|
7
13
|
### Changed
|
package/lib/device/fan-H7105.js
CHANGED
|
@@ -187,33 +187,42 @@ export default class extends GoveeDevice {
|
|
|
187
187
|
|
|
188
188
|
async internalSwingUpdate(value) {
|
|
189
189
|
try {
|
|
190
|
-
|
|
191
|
-
if
|
|
190
|
+
const newValue = value ? 'on' : 'off'
|
|
191
|
+
// Don't continue if the new value is the same as before. The comparison
|
|
192
|
+
// has to be against the mapped string - cacheSwing holds 'on'/'off' and
|
|
193
|
+
// value arrives as a boolean, so comparing them directly never matched
|
|
194
|
+
if (this.cacheSwing === newValue) {
|
|
192
195
|
return
|
|
193
196
|
}
|
|
194
197
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
//
|
|
198
|
-
//
|
|
199
|
-
//
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
198
|
+
// Same oscillation shape as the H7107, which is the only other fan that
|
|
199
|
+
// reports a swing RANGE rather than a plain on/off. Turning ON carries
|
|
200
|
+
// over the range bytes from the last report seen; turning OFF must not,
|
|
201
|
+
// because a parameterised off command was answered with a zero-tailed
|
|
202
|
+
// frame while the fan kept oscillating (#1334, #1339)
|
|
203
|
+
const tailBytes = value && this.cacheSwingCode
|
|
204
|
+
? this.cacheSwingCode.slice(6, 14).match(/.{1,2}/g).map(byte => Number.parseInt(byte, 16))
|
|
205
|
+
: []
|
|
206
|
+
await this.platform.sendDeviceUpdate(this.accessory, {
|
|
207
|
+
cmd: 'ptReal',
|
|
208
|
+
value: generateCodeFromHexValues([0x33, 0x1D, value ? 0x01 : 0x00, ...tailBytes]),
|
|
209
|
+
openApi: this.accessory.context.openApiCapabilities?.oscillationToggle
|
|
210
|
+
? { instance: 'oscillationToggle', capabilityType: 'devices.capabilities.toggle', value: value ? 1 : 0 }
|
|
211
|
+
: undefined,
|
|
212
|
+
})
|
|
213
|
+
|
|
214
|
+
// The fan's own oscillation state travels as multiSync traffic, so send
|
|
215
|
+
// that shape too. Whichever the model ignores is harmless
|
|
216
|
+
await this.platform.sendDeviceUpdate(this.accessory, {
|
|
217
|
+
cmd: 'multiSync',
|
|
218
|
+
value: generateCodeFromHexValues([0x3A, 0x1D, value ? 0x01 : 0x00, ...tailBytes]),
|
|
219
|
+
})
|
|
211
220
|
|
|
212
221
|
// Cache the new state and log if appropriate
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
222
|
+
if (this.cacheSwing !== newValue) {
|
|
223
|
+
this.cacheSwing = newValue
|
|
224
|
+
this.accessory.log(`${platformLang.curSwing} [${newValue}]`)
|
|
225
|
+
}
|
|
217
226
|
} catch (err) {
|
|
218
227
|
this.failUpdate(err, () => {
|
|
219
228
|
this.service.updateCharacteristic(this.hapChar.SwingMode, this.cacheSwing === 'on' ? 1 : 0)
|
package/package.json
CHANGED