The circadian clock is entrained by daily light fluctuations, but daily temperature fluctuations can also entrain circadian rhythms through an as yet poorly understood mechanism. Here, the authors show that the thermosensory ion channel transient receptor potential A1 (TRPA1) is expressed in the lateral posterior neurons (LPNs) — a subset of central pacemaker neurons — in flies. Flies with mutations in TrpA1 displayed abnormal circadian activity patterns after temperature entrainment and altered the expression of the clock protein period in the LPNs. These findings suggest that a molecular sensor in central pacemaker neurons contributes to temperature control of circadian rhythm.