GO:0016048: detection of temperature stimulus
The series of events in which a temperature stimulus (hot or cold) is received and converted into a molecular signal.