You need to reset the brake.
So take the caliper off, then using a screwdriver (be careful not to damage your pads, you could remove them also) push the pistons fully back as far as they will go.
Then replace pads if you removed them, mount caliper but leave the bolts loose so the caliper can move freely. Then pull the lever hard to clamp the caliper on the disc.
tighten the mounting bolts. then pump the lever some more just to be sure.
It should be bang on the money. if not look carefully as to which pad engages first and then simply loosen teh mounts a tad and slide in the opposite direction so that the pads engage at the same time.
Hope that helps