The complete statement is
if ( getTemperatureScale() != “C” ) temp = celsiusToFahrenheit(temp)
It’s split over 2 lines, but that doesn’t matter.
So that suggests that ‘getTemperatureScale()’ is not returning “C”. It looks like your hub may be set for Fahrenheit.
The setting is well hidden in the smartthings classic app. If you go to the symbol with 3 horizontal lines (bottom right on the iOS app, but somewhere else on the Android one), then the wheel symbol, you come to a page where the temperature scale is set.