diff --git a/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp b/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp index 865fef443792f7..0b7205dd83a33a 100644 --- a/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp +++ b/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp @@ -696,9 +696,8 @@ void Instance::HandleModifyForecastRequest(HandlerContext & ctx, const Commands: // NominalPower is only relevant if PFR is supported if (HasFeature(Feature::kPowerForecastReporting)) { - if (!slotAdjustment.nominalPower.HasValue() || - !slot.minPowerAdjustment.HasValue() || !slot.maxPowerAdjustment.HasValue() || - slotAdjustment.nominalPower.Value() < slot.minPowerAdjustment.Value() || + if (!slotAdjustment.nominalPower.HasValue() || !slot.minPowerAdjustment.HasValue() || + !slot.maxPowerAdjustment.HasValue() || slotAdjustment.nominalPower.Value() < slot.minPowerAdjustment.Value() || slotAdjustment.nominalPower.Value() > slot.maxPowerAdjustment.Value()) { ChipLogError(Zcl, "DEM: Bad nominalPower");