On the thermodynamics of thermoelastic materials with additional scalar degrees of freedom