Method when heating a building with solar collectors comprising also a heat pump and energy storage using phase change materials. The invention is charaterized in that the energy storage system comprises to two containers, one placed indoors, where the phase change material has a melting point between 19 and 30 degrees Celsius, and a second container located outdoors and buried in the ground, where the phase change material has a conversion temperature which corresponds to or is lower than the mean temperature of the ground surrounding the container.
Also published as EP2965012 A1 (2016-01-13)