Unit conversion for dummies?

I have a sensor that reports in US units, and some scripts that want metric inputs. I found some examples of F to C conversion using templates, but they appear to be using the old unsupported template method. Does anyone have a good example for the new system? Thanks!

old unsupported template method. ???

you should be able to paste the logic of the old way into the new way.

There are some examples of unit conversion here, including F to C.