Event-based thermal control for home automation