Push the pistons all the way back.
i find what works well for me is connect the bleed bottle to the caliper. With the pads out ready for bleeding.
open the bleed nipple and push the piston back to get some air out of the caliper 1st the finish the bleed as usual from the lever, using the open nipple, pull lever, close nipple, let go lever method.
and when its all done for front just clamp the lever over night, with a ziptie.
and rear clap the lever with a ziptie and put the bike on its back wheel with the lever blade highest