**1. Introduction**

Stagnation in energy efficiency improvements and up and down trends of carbon emissions call for ambitious targets. This is why EU sets energy efficiency at least 32.5% by 2030 [1]. Buildings are responsible for 41.7% of energy consumption [2]. Therefore, larger renovation rates, renewable heating, and related reduced pollutants [3] are actions enhanced by automation and smart controls in [4]. At present, the increase of open data availability and its inclusion in countries policies for renewable energy assessment [5], and to improve the energy performance of the building stock and data collecting of operational phase [6].

On the side of renewable energy, the European Commission set that the contribution of renewables in 2030 will cover 32% of final energy consumptions. Today, the major part of the energy system is based on fossil fuels. By mid-century, this will change radically with the large-scale electrification of the energy system driven by the deployment of renewables and fully developed alternative fuel options [7]. Regarding the electric sector, this ambitious goal implies that more than half of the European electricity demand will be met by renewables. Large RES integration and control strategies are crucial for actual decarbonization at the national [8] as well as urban scale [9]. It entails the deep testing and calibration of multi-energy flows modelling [10] to manage stochastic behavior of renewables. Together with this modelling part, actual involvement of consumers and producers is done by Smart Grid approach [11] and Demand Response (DR) Program [12].

DR aims at adjusting consumers' demand to the energy flow or market price thanks to Demand Side Management (DSM) by means of incentive paid to them [13]. Therefore, buildings connected to the grid can be players by offering peak shaving or balancing services, and their value is weighted on the amount of flexible power for each single user. It implies in building such a mechanism, the crucial role played by probabilistic modelling is beyond the design of the load profile for buildings [14] and beyond the incentive schemes for the market [15]. Dwellings have a small flexible power when considered alone, while a group of them offers the chance to design several pathways of participation to the market, from the local installation of storage [16] to tariff definition [17], from their aggregation as robust and optimized equivalent load [18] up to the neighborhood scale [19], and the sum of their equipment as well [20].

When heating systems are electric-driven, a great potential of flexibility occurs and is enhanced by accounting for building thermal inertia [21] or installation of further storage means. The share of electric-driven heating and cooling on the total electricity and whole energy demand is, therefore, linked to the climatic conditions of building location, its characteristics, and the occupants' behavior [22]. As a matter of fact, the intended use of the building is where electric DHW production is installed and number of occupants are the main parameters affecting the final load value [23]. Moreover, those parameters affect the shiftable loads as well and can be generalized to all the electric appliances and devices used in dwellings [24].

With the aim to assess the potential of flexibility in dwellings, the temporal changes in the residential sector and the trends of energy efficiency policies is a key player [25]. In [26], determinants and trends of energy consumption in EU dwellings is analyzed accounting for impact and effectiveness of energy efficiency policies already implemented. A gap in the analysis is the effect of retrofitting strategies on the current and future flexibility potential, especially when the fuel switching is foreseen and, subsequently, a massive electrification is promoted.

The same gap is identified in the recent literature for Key Performance Indicators (KPI) elaboration. They were generally built to check viability of refurbishment considering economic output such as Wang et al. [27] on a life cycle base or in [28] where net present value, the payback period, and energy savings are taken as the main performance indicators of the retrofitting plan. Wu et al. [29] extended the life cycle analysis to GHG emissions. while Penna et al. [30] checked the thermal comfort ensured by the new building scenarios. Asadi et al. [31] provided an optimization process for environmental and economic performances and Guardigli et al. [32] assessed the economic sustainability of various project alternatives with net present value and global cost, but including social aspects as well. Therefore, energy saving and economic trade-off are largely used in literature [33], especially if the building stock owner is a Public Administration [34] or Social Housing corporate [35]. Only deep renovations seem to be the place for further research questions. However, they are intended to provide more detailed economic outcomes such as in [36], where Niemelä et al. checked cost-optimal retrofit measures in typical Finnish buildings or in [37], where Ortiz et al. designed cost-optimal scenarios for retrofitting residential buildings in Barcelona on global cost evaluation for building lifespan. Assessing the effects of energy retrofitting on flexibility is still missing and is investigated by the authors of the current paper by means of dedicated KPIs.

Four indicators are built: (i) the energy consumption; (ii) renewable energy use; (iii) local carbon emissions; and (iv) flexible loads amount. In detail, local emissions were considered instead of global emissions since there is a clear correlation between those latter ones and the energy consumption due to the calculation methods, while their allocation is not specified [38].

The presence of conventional KPIs, i.e., the first three ones linked to a fourth, the new one, is useful to see the eventual correlation or dependence on each other. Indeed, the flexible loads amount and the observation of its link with the other indicators is the novel contribution of this study. That metric is neglected for dwellings, being the gap to be filled by this study. To summarize, the present study analyzes the effects of different energy retrofitting solutions on the flexibility potential of dwellings. A sample of 419 dwellings in Italy is built thanks to a survey among the students of the Faculty of

Architecture at Sapienza University of Rome. A questionnaire designed for non-energy experts is used to collect the data. Then, simulation scenarios provide the outcome of the new energy demand, its new proportion among fuel and electricity based, and the updated share between the aforementioned different flexible loads.
