The Tolman–Ehrenfest criterion for the thermal equilibrium of a fluid at rest in a static general-relativistic geometry is generalized to scalar–tensor gravity. Surprisingly, the gravitational scalar field, which fixes the strength of the effective gravitational coupling, does not play a role in determining thermal equilibrium. As a result, heat does not sink more in a gravitational field where gravity is stronger.