## 7 Results and Discussion
### Winter
In relation to outdoor temperature variation (Figure 4) and energy use patterns (Figure 8), the indoor temperature profile introduces a pattern in the HVAC system's energy consumption, which interacts with the outdoor temperature, as seen in Figure 9.  
During nighttime and working hours on weekdays, when the indoor temperature is set to 18 \({}^{\circ}\)C, the HVAC system uses less energy, which aligns with the observed consumption minimums. In contrast, during the morning, when the temperature rises to 20 \({}^{\circ}\)C for preparation, and in the evening, when it increases to 21 \({}^{\circ}\)C for comfort, the HVAC consumption rises due to the additional effort required to reach the programmed temperatures, especially on colder days. On days with lower outdoor temperatures, the HVAC system needs to work harder to heat the house, resulting in higher consumption peaks. Conversely, on days with higher outdoor temperatures, the HVAC requires less energy, since the outdoor temperatures are closer to the desired indoor settings. On weekends, when the indoor temperature remains at 21 \({}^{\circ}\)C for most of the day to ensure comfort, HVAC consumption is likely more constant and higher compared to weekdays, though this pattern depends on outdoor temperatures. Then, after running the model for a representative winter week, and as a result of the planner, the new target temperature profile is as indicated in Figure 10.  
Figure 8: Electricity consumption of HVAC, other household loads, photovoltaic production, and storage elements for a winter week. Figure 9: Outdoor temperature variation and HVAC system’s energy consumption. As can be seen in Figure 10, there are certain hours when the target temperature has risen due to the use of the home as a battery. With the new temperature profile, we run the MPC model again, obtaining the results that appear in Figure 11. Again, the blue and yellow lines in Figure 11 are coincident and overlapping with the green line, so that only the green line is visible in this figure. The temperatures in Figure 11 show greater stability and do not drop as abruptly after reaching the target temperature. This smoother evolution suggests that the TES of the home is functioning, meaning that the heat stored in the walls, floors, or structural elements helps maintain the temperature for a longer period. As a result, the HVAC system does not need to respond as aggressively or as frequently, reducing peak energy demand and improving system efficiency. The comparison between Figures 6 and 11 highlights the influence of the TES on the temperature evolution of the home. In Figure 6, the lack of thermal storage capacity generates more pronounced temperature fluctuations, forcing the HVAC system to work more intensively. In contrast, in Figure 11, the use of the thermal battery provides greater thermal inertia, reducing heat losses and stabilizing the temperature across different zones of the building. This not only enhances thermal comfort but also decreases energy consumption by optimizing the operation of the HVAC system. The thermal power required by the HVAC system in the scenario of using the planner and the TES is shown in Figure 5:0  
Figure 5:1 Temperature evolution inside the different enclosures for a winter week. Figure 5:2 New target temperature profile inside the enclosures for a winter week. Figure 13 highlights the differences in energy consumption between systems with and without a planner. With a planner, energy usage exhibits noticeable peaks at specific times, reflecting the system's strategy of charging the battery and TES during periods of lower electricity demand and cheaper prices. This optimized approach stores energy during these optimal periods, reducing consumption during high-demand or high-cost times. In winter, as shown in Figure 13, this strategy concentrates energy usage exclusively during low-price periods, ensuring no energy is consumed during peak pricing times, thereby maximizing cost efficiency.