Indonesia, located along the equator, experiences a tropical climate that results in high indoor temperatures. Elevated temperatures can affect health, making air conditioning (AC) necessary to regulate indoor environments. However, improper use of AC systems, such as leaving them on even when a room is unoccupied, can lead to significant energy waste. This research focuses on the efficient use of AC systems through the integration of sensors and cameras, combining two distinct technologies. The first technology is object detection using You Only Look Once (YOLOv8), which was chosen for its superior performance in terms of speed, accuracy, and computational efficiency. The second is the classification of optimal AC temperatures using the Multilayer Perceptron (MLP) algorithm, selected for its high performance in accuracy, sensitivity, and speed. In addition, the study takes into account human density in the room to optimize temperature regulation. The integration of object detection and temperature classification technologies enables the system to operate in real time and automatically adjust temperature settings based on dynamic room conditions. The research successfully implemented YOLOv8 for object detection and Multilayer Perceptron for optimal room temperature classification. Test results showed precision, recall, and F1-score values of 0.82, 0.92, and 0.86, respectively.