I am using the MQTT, and Home Assistant discovery Octoprint plugins. The temperature sensors display in Home Assistant in Fahrenheit, as this is set as the default in my Home Assistant config, but I want these ones to display in Celsius. So I go into the entity and change the unit of measurement, but when I close nothing changes and when I come back it says F again. This post made it sound like maybe this is due to a missing native_unit_of_measurement attribute in the entity, but I’m trying to be sure and figure out who I should report a bug to. I am using the native MQTT integration in Home Assistant, so is this a Home Assistant bug? Or can the author of the Home Assistant Octoprint plugin add this? Using MQTT explorer, I tried adding “native_unit_of_measurement” as a property in the Home Assistant entity payload, but that did not do anything.
Can you post your MQTT output for that device?
I have taken information from sensors in the past and created new sensors based on the value.
Here is the configuration/discovery entry that the Octoprint plugin creates:
homeassistant/sensor/8d86aa895cac439c94711e4365038000_BED_TARGET/config:
{
"avty_t": "~mqtt",
"pl_avail": "connected",
"pl_not_avail": "disconnected",
"~": "octoPrint/",
"name": "OctoPrint Bed Target",
"uniq_id": "8d86aa895cac439c94711e4365038000_BED_TARGET",
"stat_t": "~temperature/bed",
"unit_of_meas": "°C",
"val_tpl": "{{value_json.target|float(0)}}",
"device": {
"ids": "8d86aa895cac439c94711e4365038000",
"name": "OctoPrint",
"mf": "Clifford Roche",
"mdl": "HomeAssistant Discovery for OctoPrint",
"sw": "HomeAssistant Discovery for OctoPrint 3.6.2"
},
"dev_cla": "temperature",
"ic": "mdi:radiator"
}
And here is the payload of data:
octoPrint/temperature/bed:
{
"actual": 59.89,
"target": 60,
"_timestamp": 1661741380
}
I did manually create the entity the way I want it by adding mqtt integration code in my configuration.yaml, but this is supposed to be possible by just changing the setting in the UI for the autodiscovered entity, so I’m trying to figure out what is missing to make this method work:
When I choose C and click update, nothing changes, and when I come back to this window it has reset to F.