Etymonline avouches that
Sense of "degree of heat or cold" first recorded 1670 (Boyle), from Latin temperatura, used in this sense by Galileo.
But "degree of heat or cold" doesn't semantically appertain to temperatura, which originally signified "mixture" as quoted below. Why did Galileo pick this unrelated noun of temperatura?
The verb temper was borrowed into Old English from Latin temperāre ‘mix, blend’. This seems originally to have meant ‘mix in due proportion’, and so may have been derived from Latin tempus ‘time, due time’ (source of English temporary). The noun temper was derived from the verb in the 14th century in the sense ‘mixture of elements’, and this led on in the 17th century to ‘set of mental traits’ (a meaning that has now largely passed to the derivative temperament ). The modern sense ‘ill humour’ emerged from this in the 19th century. Another meaning of Latin temperāre was ‘restrain oneself’, which has come through into the derivatives temperance  and temperate . Other relatives include distemper and temperature.
Tamper probably originated as an alteration of temper.
Like its relatives temper and temperament, temperature originally meant ‘mixture’ (Philemon Holland in 1601 wrote of ‘a temperature of brass and iron together’). The modern sense ‘degree of heat’ emerged in the late 17th century, and seems to have evolved from another early and now obsolete sense, ‘mild weather’. This reflected the ‘restraint’ strand of meaning in the word’s ultimate source, Latin temperāre, which also survives in English temperance and temperate.
Word Origins (2005 2e) by John Ayto. p 500 Left column.
Although temperature is rarely if ever used in these ways today, the implication of moderation likely influenced people to apply it as a word for the mildness of weather or climate,