Integration of renewable energy sources in buildings