Discriminating among sensory stimuli is critical for animal survival. This discrimination is particularly essential when evaluating whether a stimulus is noxious or innocuous. From insects to humans, transient receptor potential (TRP) channels are key transducers of thermal, chemical and other sensory cues. Many TRPs are multimodal receptors that respond to diverse stimuli, but how animals distinguish sensory inputs activating the same TRP is largely unknown. Here we determine how stimuli activating Drosophila TRPA1 are discriminated. Although Drosophila TRPA1 responds to both noxious chemicals and innocuous warming, we find that TRPA1-expressing chemosensory neurons respond to chemicals but not warmth, a specificity conferred by a chemosensory-specific TRPA1 isoform with reduced thermosensitivity compared to the previously described isoform. At the molecular level, this reduction results from a unique region that robustly reduces the channel's thermosensitivity. Cell-type segregation of TRPA1 activity is critical: when the thermosensory isoform is expressed in chemosensors, flies respond to innocuous warming with regurgitation, a nocifensive response. TRPA1 isoform diversity is conserved in malaria mosquitoes, indicating that similar mechanisms may allow discrimination of host-derived warmth--an attractant--from chemical repellents. These findings indicate that reducing thermosensitivity can be critical for TRP channel functional diversification, facilitating their use in contexts in which thermal sensitivity can be maladaptive.