We investigate the impact of excess PbI2 in the precursor solution on the structural and optical properties of thin films of the model hybrid perovskite methylammonium lead iodide (MAPbI3). We find that excess of PbI2 in the precursor solution results in crystalline PbI2 in the final thin film that is located at the grain boundaries. From UPS we find that this crystalline PbI2 phase has no direct impact on the electronic structure of MAPbI3. In contrast to this, temperature dependent absorption measurements indicate a systematic change in the temperature dependence of the exciton binding energy in the perovskite. We also observe a decrease in the critical temperature and a concomitant smearing out of the tetragonal–orthorhombic phase transition as a function of excess PbI2. Our results thus help to better understand the exact role of PbI2 in the perovskite layer and pave the way for a more tailored design of perovskite solar cells.