A controller for use with a thermal energy buffering system having a thermal energy buffer, and a thermal buffering medium contained within said thermal energy buffer, whereby a volume of the thermal buffering medium is subdivided in one or more different parts such that the different parts of the volume of the thermal buffering medium together form the total thermal buffering medium present in the thermal energy buffer; and the thermal energy buffer comprises a respective temperature sensor for each different part for sensing a temperature of the thermal buffering medium contained in the part, the controller being adapted to receive at least one signal representing predetermined values related to the thermal energy buffer), the predetermined values comprising: - a maximum temperature (T max) settable by a user, - a predetermined minimum amount of thermal energy present in the thermal energy buffer settable by a user, and - a predetermined minimum temperature (T min) wherein the controller is adapted to calculate the following thermal energy values: - a value representing the amount of thermal energy present in the thermal energy buffer, - a minimal amount of heating energy representing the amount of energy required to, using a heater, heat all the thermal buffering medium to said predetermined minimum temperature starting from the amount of thermal energy present in the thermal energy buffer, and - an amount of energy required to heat all the thermal buffering medium to said predetermined maximum temperature, using the heater, starting from the amount of thermal energy present in the thermal energy buffer, wherein the controller is adapted to control the heater of the thermal buffer in function of said thermal energy values such that the amount of energy present in the thermal energy buffer is higher than or equals the predetermined minimum energy present in the thermal energy buffer, the controller being further adapted to calculate a value representing the amount of thermal energy present in the thermal energy buffer by multiplying the temperature measured by the one or more sensors sensing the temperature of the one or more different parts of the thermal buffering medium with the volume of the at least one part of thermal buffering medium such as to obtain at least one value representing the partial thermal energy contained in the at least one part by the thermal buffering medium and adding the resulting at least one partial thermal energy value to each of any other, and in that the controller is adapted to calculate the minimal amount of heating energy by multiplying the difference between the predetermined minimum temperature and the temperature measured by the one or more temperature sensors of the one or more different parts containing thermal buffering medium having a temperature measured by their respective sensors which is lower than the predetermined minimum temperature with the respective volumes of the different parts containing thermal buffering medium having a temperature measured by their respective sensor which is lower than the predetermined minimum temperature and adding the resulting values to each of any other, the controller being adapted to calculate the maximal amount of heating energy by at least multiplying the difference between the predetermined maximum temperature and the temperature measured by the one or more temperature sensors with the respective volume of the part corresponding to the temperature sensor and adding the resulting values to each of any other. - a maximum temperature (T max) settable by a user, - a predetermined minimum amount of thermal energy present in the thermal energy buffer settable by a user, and - a predetermined minimum temperature (T min) - a value representing the amount of thermal energy present in the thermal energy buffer, - a minimal amount of heating energy representing the amount of energy required to, using a heater, heat all the thermal buffering medium to said predetermined minimum temperature starting from the amount of thermal energy present in the thermal energy buffer, and - an amount of energy required to heat all the thermal buffering medium to said predetermined maximum temperature, using the heater, starting from the amount of thermal energy present in the thermal energy buffer,