Smart home is a concept that aims to maximize the comfort of occupant while consuming energy as low as possible. The comfort and energy consumption are contradicting factors in smart homes. Enhancing comfort often requires considerable energy. On the other hand, minimizing energy may result in less comfort to the residence. Thus, maximizing comfort while minimizing energy consumption is a challenging process. In this paper, bat algorithm (BA) based solution is proposed to tackle this problem. Three main parameters that influence the occupant’s comfort, namely, temperature, illumination, and indoor air quality, are considered. The algorithm optimizes towards the best set of values for the three parameters. In this work, exponentially increasing inertia weight is introduced to BA for performance improvement. A secondary dataset consisting of 48 environmental values is optimized using the proposed algorithm. The performance of BA with exponential inertia weight is proven as significantly better than the original BA and other variants of inertia weight; random, linearly decreasing, and nonlinearly decreasing. Moreover, the comfort level achieved by BA with exponential inertia weight is found to be better than previously reported works using firefly algorithm, genetic algorithm, ant colony optimization, and artificial bee colony algorithm. The superior performance is achieved due to better convergence behaviour. Summarily, applying BA with exponential inertia weight is a novel contribution that is essential for providing smart home system a solution that ensures optimum comfort at minimal energy consumption.