@riddix/hamh 2.1.0-alpha.469 → 2.1.0-alpha.471
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/dist/backend/cli.js
CHANGED
|
@@ -166477,13 +166477,13 @@ var FanControlServerBase = class extends FeaturedBase4 {
|
|
|
166477
166477
|
percentage = Math.floor(speed / speedMax * 100);
|
|
166478
166478
|
}
|
|
166479
166479
|
}
|
|
166480
|
+
const isOff = percentage === 0;
|
|
166480
166481
|
const fanModeSequence = this.getFanModeSequence();
|
|
166481
|
-
const fanMode = config10.isInAutoMode(entity.state, this.agent) ? FanMode.create(FanControl3.FanMode.Auto, fanModeSequence) : FanMode.fromSpeedPercent(percentage, fanModeSequence);
|
|
166482
|
+
const fanMode = !isOff && config10.isInAutoMode(entity.state, this.agent) ? FanMode.create(FanControl3.FanMode.Auto, fanModeSequence) : FanMode.fromSpeedPercent(percentage, fanModeSequence);
|
|
166482
166483
|
if (percentage > 0) {
|
|
166483
166484
|
this.lastNonZeroPercent = percentage;
|
|
166484
166485
|
this.lastNonZeroSpeed = speed;
|
|
166485
166486
|
}
|
|
166486
|
-
const isOff = percentage === 0;
|
|
166487
166487
|
try {
|
|
166488
166488
|
applyPatchState(this.state, {
|
|
166489
166489
|
percentSetting: isOff ? 0 : percentage,
|
|
@@ -166688,13 +166688,15 @@ var FanControlServerBase = class extends FeaturedBase4 {
|
|
|
166688
166688
|
return;
|
|
166689
166689
|
}
|
|
166690
166690
|
if (onOff && this.lastNonZeroPercent > 0) {
|
|
166691
|
-
|
|
166692
|
-
|
|
166693
|
-
|
|
166694
|
-
|
|
166695
|
-
|
|
166696
|
-
|
|
166697
|
-
|
|
166691
|
+
this.agent.asLocalActor(() => {
|
|
166692
|
+
try {
|
|
166693
|
+
applyPatchState(this.state, {
|
|
166694
|
+
percentSetting: this.lastNonZeroPercent,
|
|
166695
|
+
...this.features.multiSpeed && this.lastNonZeroSpeed > 0 ? { speedSetting: this.lastNonZeroSpeed } : {}
|
|
166696
|
+
});
|
|
166697
|
+
} catch {
|
|
166698
|
+
}
|
|
166699
|
+
});
|
|
166698
166700
|
}
|
|
166699
166701
|
}
|
|
166700
166702
|
// Cross-cluster sync: keep OnOff in sync with FanControl per Matter spec
|