The series of events involved in the perception of pain in which a temperature stimulus is received and converted into a molecular signal.
sensory detection of thermal stimulus during sensory perception of pain