Nowadays, microgrids are gaining importance in electric power generation and distribution environments due to their flexibility, versatility, scalability and the possibility of supplying ancillary services when connected to the grid. They allow for the customization of electric supply for very different types of consumers. Therefore, a new control model for power and energy management based on homeostaticity of electric power systems (EPS) is presented, which has been already analyzed and approved by ENEL Chile in its developmental stage. ENEL, the largest electric utility in the country, is interested in incorporating smart microgrids in the electricity distribution market, as part of a worldwide policy. Such microgrids are to be installed in buildings serviced by ENEL. To demonstrate the model’s utility, a Simulink model of a real microgrid is used, which is comprised of PV generation, energy storage, an air conditioning (AC) equipment and thermal storage of the building upon which the microgrid is installed. The behavior of every element is simulated, including the dynamic thermal model of the building in order to optimize energy management and power supply versus consumption. The behavior of the whole system is analyzed under different environmental profiles and energy consumption patterns using the proposed homeostaticity system.