Thermometry based on thermal expansion