C'mon, you spent lots of money on your Di2 build just to install your battery with tape and foam? Ad hoc solutions using tape and foam have multiple issues. The net result is often a damaged or stuck battery.
Problems with Tape or Foam:
We make Di2 battery holders for 27.2 mm seat posts with 21 mm through 23 mm inside diameters. If the measurement is more than .5 mm from the available sizes or an odd shape (tapered internal tube, aero, etc.), contact us for a custom version.