File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/app/clusters/fan-control-server Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -383,10 +383,6 @@ void MatterFanControlClusterServerAttributeChangedCallback(const app::ConcreteAt
383383 DataModel::Nullable<Percent> percentSetting;
384384 Status status = PercentSetting::Get (attributePath.mEndpointId , percentSetting);
385385 VerifyOrReturn (Status::Success == status && !percentSetting.IsNull ());
386- uint8_t speedMax;
387- status = SpeedMax::Get (attributePath.mEndpointId , &speedMax);
388- VerifyOrReturn (Status::Success == status,
389- ChipLogError (Zcl, " Failed to get SpeedMax with error: 0x%02x" , to_underlying (status)));
390386
391387 // Avoid circular callback calls
392388 ScopedChange PercentWriteInProgress (gPercentWriteInProgress , true );
@@ -400,6 +396,11 @@ void MatterFanControlClusterServerAttributeChangedCallback(const app::ConcreteAt
400396
401397 if (SupportsMultiSpeed (attributePath.mEndpointId ))
402398 {
399+ uint8_t speedMax;
400+ status = SpeedMax::Get (attributePath.mEndpointId , &speedMax);
401+ VerifyOrReturn (Status::Success == status,
402+ ChipLogError (Zcl, " Failed to get SpeedMax with error: 0x%02x" , to_underlying (status)));
403+
403404 // Adjust SpeedSetting from a percent value change for PercentSetting
404405 // speed = ceil( SpeedMax * (percent * 0.01) )
405406 uint16_t percent = percentSetting.Value ();
You can’t perform that action at this time.
0 commit comments