The well-known quadratic temperature–velocity (TV) relation is significant for physical understanding and modelling of compressible wall-bounded turbulence. Meanwhile, there is an increasing interest in employing the TV relation for laminar modelling. In this work, we revisit the TV relation for both laminar and turbulent flows, aiming to explain the success of the TV relation where it works, improve its accuracy where it deviates and relax its limitation as a wall model for accurate temperature prediction. We show that the general recovery factor defined by Zhang et al. (J. Fluid. Mech., vol. 739, 2014, pp. 392–440) is not a wall-normal constant in most laminar and turbulent cases. The effective Prandtl number
$Pr_e$ is more critical in determining the shape of temperature profiles. The quadratic TV relation systematically deviates for laminar boundary layers irrespective of Mach number and wall boundary conditions. We find a universal distribution of
$Pr_e$, based on which the TV relation can be notably improved, especially for cold-wall cases. For turbulent flows, the TV relation as the wall model can effectively improve the near-wall temperature prediction for cold-wall boundary layer cases, but it involves boundary-layer-edge quantities used in the Reynolds analogy scaling, which hinders the application of the wall model in complex flows. We propose a transformation-based temperature wall model by solving inversely the newly developed temperature transformation of Cheng and Fu (Phy. Rev. Fluids, vol. 9, 2024, no. 054610). The dependence on edge quantities is thus removed in the new model and the high accuracy in turbulent temperature prediction is maintained for boundary layer flows.