Modern power supply systems are designed so that the consumer does not control them. Electricity is produced centrally and comes to apartments and non-residential buildings "from the outside". With this approach to energy supply, electricity is produced in two ways. The first one is to generate electricity from non-renewable energy sources in large power plants, which leads to increased CO2 emissions. The second one tries to solve this problem with the help of renewable energy sources. However, renewable energy sources require significant sites for the equipment. In addition, industrial consumers are not concentrated in areas with high energy potential. Rocky seashores or areas with a large number of sunny days per year (a prime example of the Sahara), as a rule, are uninhabited.
Now let's imagine a city when energy is generated by the buildings themselves. Smart energy sources can be a part of the city's architecture. This practice is really effective and aesthetic. And architectural bureaus (for example, in Germany) are already actively engaged in the creation of energy-positive buildings.