Electrical energy has an important role in human life. One of the efforts to save electrical energy is to automate the lights in the classroom because currently they are still using manual light switches. This system aims to automate lights based on the detection of human presence using the AMG8833 thermal camera and use 4 LDR sensors to determine the light intensity as input for the number of lights that must be activated so that the lighting in the classroom meets SNI, which is 250 lux. NodeMCU ESP8266 as a micro controller will process data from the thermal camera and LDR sensor to be sent to the relay actuator as output. From the designs and experiments that have been carried out, the results of the LDRI sensor accuracy are 98.11 %, the LDR2 sensor is 98.04%, the LDR3 sensor is 98.43%, and the LDR4 sensor is 98.21 %. While the AMG8833 thermal camera can work quite well with parameters, namely if there is a pixel temperature that is more than 30°C, the system will detect the presence of humans in the room.