@riddix/hamh 2.1.0-alpha.416 → 2.1.0-alpha.417

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.
@@ -165807,15 +165807,16 @@ var FanControlServerBase = class extends FeaturedBase3 {
165807
165807
  }
165808
165808
  const fanModeSequence = this.getFanModeSequence();
165809
165809
  const fanMode = config10.isInAutoMode(entity.state, this.agent) ? FanMode.create(FanControl3.FanMode.Auto, fanModeSequence) : FanMode.fromSpeedPercent(percentage, fanModeSequence);
165810
+ const isOff = percentage === 0;
165810
165811
  try {
165811
165812
  applyPatchState(this.state, {
165812
- percentSetting: percentage,
165813
+ ...isOff ? {} : { percentSetting: percentage },
165813
165814
  percentCurrent: percentage,
165814
165815
  fanMode: fanMode.mode,
165815
165816
  fanModeSequence,
165816
165817
  ...this.features.multiSpeed ? {
165817
165818
  speedMax,
165818
- speedSetting: speed,
165819
+ ...isOff ? {} : { speedSetting: speed },
165819
165820
  speedCurrent: speed
165820
165821
  } : {},
165821
165822
  ...this.features.airflowDirection ? {