The development of smart grids makes possible the introduction of dynamic electricity rates, with prices changing each hour. Dynamic rates can reflect the temporal dependency of supply and demand for electrical power and network capacity, thus avoiding load peaks and promoting the use of fluctuating renewable energy sources. We present a simulation model that studies the electricity demand for heating and cooling modern office buildings in the context of dynamic electricity prices. The model permits the simulation of scenarios in which existing thermal energy reservoirs (warm and cold water tanks) are used for the smart grid integration by means of adapted control strategies. The adaptation to dynamic electricity rates – and thus indirectly to the fluctuating supply of wind and solar power – is achieved solely by changing the control of the existing infrastructure without changing the infrastructure itself.