Smart Buildings have been the subject of research for more than two decades. The different perspectives range from monitoring and controlling energy consumption. Indeed, energy efficiency is considered as one of the promising fields of applications of the Internet of Things. Since Smart Buildings are an important part of the smart grid, their energy efficiency is vital for the environment and global sustainability. In ubiquitous computing systems, designing Smart Building applications is a challenge since these applications must ensure a trade-ofT between energy consumption and occupants comfort especially in ubiquitous environments. In this paper, we focus on the design of a Smart Building application in ubiquitous computing systems. TheSmart Building application is able to manage energy consumption while keeping the occupants comfort. We elaborate an illustrative scenario to demonstrate the usefulness of our work.