I’ve been using unit_of_measurement: 'C' in my customize.yaml for 6 months now and it’s worked perfectly… until this week. Now my printers are showing a temperature of “392 C” which is obviously wrong (it’s the F temp with a C label).
MQTT sends octoPrint/temperature/tool0 as { "actual": 200.89, "target": 200.0 }. The MQTT plugin for Octoprint doesn’t send any units, but that’s what the code in customize.yaml was previously fixing. The HASS developer tools lists sensor.octoprint2_tool_0_temperature with state of 392.0 and unit_of_measurement: C. So… the temperature is once again being converted to imperial, and only the unit is being set.
I’m guessing an update somewhere broke this, but I haven’t dug into recent changes to see what it could be. Looks like the last HASS Core update included a “Fix handling of imperial units in long term statistics” checkin but I have no idea if that changed the behavior.
I may just switch to the template sensor solution…