**1. Introduction**

Europe aims to achieve climate neutrality by 2050, which means net-zero greenhouse gas emissions. Entire society and economic sectors must join this task to reach the final objective, from industry to mobility, building, agriculture, etc. Building sector in Europe consumed 40% of the final energy in 2018, with just household being 26% of the final energy, similar to the industry sector [1]. According to the Spanish "Instituto para la Diversificación y Ahorro de la Energía (IDAE)" report [2], space heating and sanitary hot water are responsible of 58% to 75% of the final energy consumption in flats and singlefamily houses in Spain, respectively. Single-family houses account for the biggest energy share supplied from renewable energy, which is close to 40% in the Mediterranean area. However, this is not enough to meet the 2050 EU objective, because 47% of the energy supply still comes from fossil fuels. The Energy Performance of Buildings Directive (EPBD) (2010/31/EU) [3] is the legislative framework "to achieve a high energy efficiency and decarbonize building stock by 2050". EPBD states that from 31 December 2020 all new edifications must be nearly zero-energy buildings (nZEB). These are "buildings with a

very high energy performance and the low amount of energy that these buildings require comes mostly from renewable sources". Primary energy consumption analysis is how the EPBD evaluates the building energy efficiency due to the variety of energy sources that are used. "The concept of primary energy attempts to provide a simple metric for all forms of energy that are supplied to, transmitted through, a defined boundary" [4]. The EPBD leaves the member states to determine the methodology to calculate the primary energy factor and CO2 emissions for each end-use energy source depending on the energy supply grid circumstances. Improving energy efficiency and the share of renewable sources are also main targets of the Spanish Government, as they are reflected in the Integrated National Energy and Climate Plan 2021–2030 [5]. According to this plan, high-efficiency renewable cogeneration facilities are going to be part of the comprehensive strategy for energy efficiency in cities.
