Setting unit of measurement in YAML

I’m located in the US and have my instance set to use imperial units. I also have a 3D printer connected using Octoprint which reports it’s temperatures to HA.

By default these are reported in imperial units although metric units are more commonly used. I’m able to set the unit of measurement for the entity from the UI and there is a conversion that takes place properly.

Ideally I would like to set this in the YAML, though when I try to set the unit_of_measurement like so:

homeassistant:
  customize:
    sensor.octoprint_actual_bed_temp:
      unit_of_measurement: "°C"

No temperature conversion takes place.

Is there a way to update the unit of measurement using YAML, the same way the UI does it?