The problems of heat and mass transfer in phase change materials are of great engineering interest. The absorption and storage of energy in the form of latent heat makes it possible to use them in the construction industry to smooth out the effects of temperature transitions in the environment. This work is devoted to the study of heat transfer in a building block with paraffin inserts under unsteady external conditions. The influence of the geometric dimensions of the block and the volume fraction of the phase change material on the effect of restraining external temperature fluctuations was studied. The unsteady conjugate melting problem was solved in a closed rectangular region with two cavities filled with PCM. The temperature of the environment on the left boundary changes in harmonic law. Thermal distributions were obtained at various points in time.