Smart homes is an emerging technology that is transforming the way people live and interact with their homes. These homes are equipped with various devices and technologies that allow the homeowner to control, monitor, and automate various aspects of their home. This can include lighting, heating and cooling, security systems, and appliances. However, to enhance the efficiency of these homes, machine learning algorithms can be utilized to analyze the data generated from the home environment and adapt to user behaviors. This paper proposes a smart home system empowered by machine learning algorithms for enhanced user behavior prediction and automation. The proposed system is composed of three modes, including manual, automatic, and intelligent, with the objectives of maximizing security, minimizing human effort, reducing power consumption, and facilitating user interaction. The manual mode offers control and monitoring capabilities through a web-based user interface, accessible from anywhere and at any time. The automatic mode provides security alerts and appliances control to minimize human intervention. Additionally, the intelligent mode employs machine learning classification algorithms, such as decision tree, K-nearest neighbors, and multi-layer perceptron, to track and predict user actions, thereby reducing user intervention and providing additional comfort to homeowners. Experiments conducted employing the three classifiers resulted in accuracies of 97.4%, 97.22%, and 97.36%, respectively. The proposed smart home system can potentially enhance the quality of life for homeowners while reducing energy consumption and increasing security.