Hybrid energy supply systems have been increasingly considered as a preferred choice to meet not only the electricity demand of the new buildings but also to provide for their cooling and heating requirements. This paper proposes a new method to generate the optimal hybrid energy system mix and suggests the ways how the energy is used under normal operating conditions. In this all inclusive approach the end-use energy demand, primary energy sources and available storage technologies of the building are analysed simultaneously. This has only been made possible by the recent advances in SmartGrids technology and control systems offering more flexibility in selection of management methods for active control of energy generation and demand. A case study consisting of three different scenarios was used to demonstrate the effectiveness of this integrated approach to find an optimal system structure from a large mix of alternative solutions.