Body temperature homeostasis is an essential function that relies upon the integration of the outputs from multiple classes of cooling- and warming-responsive cells. The computations that integrate these diverse outputs to control body temperature are not understood. Here we discover a new set of Warming Cells (WCs), and show that the outputs of these WCs and previously described Cooling Cells (CCs 1 ) are combined in a cross-inhibition computation to drive thermal homeostasis in larval Drosophila . We find that WCs and CCs are opponent sensors that operate in synchrony above, below, and near the homeostatic set-point, with WCs consistently activated by warming and inhibited by cooling, and CCs the converse. Molecularly, these opponent sensors rely on overlapping combinations of Ionotropic Receptors to detect temperature changes: Ir68a, Ir93a, and Ir25a for WCs; Ir21a, Ir93a, and Ir25a for CCs. Using a combination of optogenetics, sensory receptor mutants, and quantitative behavioral analysis, we find that the larva uses flexible cross-inhibition of WC and CC outputs to locate and stay near the homeostatic set-point. Balanced cross-inhibition near the set-point suppresses any directed movement along temperature gradients. Above the set-point, WCs mediate avoidance to warming while cross-inhibiting avoidance to cooling. Below the set-point, CCs mediate avoidance to cooling while cross-inhibiting avoidance to warming. Our results demonstrate how flexible cross-inhibition between warming and cooling pathways can orchestrate homeostatic thermoregulation.