Build an ESP32 / ESP8266 Thermostat Web Server with an input field to set a temperature threshold. With this you can control an output based on the temperature.