For temperature dependent effects there are things like self-compensated strain gauges (where their temperature related deformation counteracts that of a target material), or dual side measurement (sandwich a bar between two strain gauges, strain cause compression on one, elongation on the other, so +-/-+, while temperature compresses or elongates both (++/--), cancels out.)