Electric heat pumps combined with heat buffers are important elements in smart grids since they together allow to shift the consumption of electricity in time. In this paper the effects of different control algorithms for heat pumps on the investment costs for distribution grids are investigated. For this, an optimization approach is implemented for a case study within an area where the buildings are only supplied by electricity. The simulations use real smart meter data to generate realistic load curves of households and heat pumps. The calculations show that grid costs increase up to 71% with an inappropriate control and decrease by 10% with an optimal integration of heat pumps. Furthermore, the costs for the reinforcement of the grid are confronted with the benefits on consumer side using flexible price signals. The cost-benefit analysis shows that considering grid restrictions in the context of controllable devices is highly recommended.