Skip to main content

Translating units of measurement

· One min read

Home Assistant 2024.12 will support the translation of custom units of measurement. Previously, those would have been hardcoded in their integrations.

Just like for entity names, integrations just need to set the translation_key on the entity definition and provide the unit designation in the strings.json file (with the new unit_of_measurement key):

{
"entity": {
"sensor": {
"subscribers_count": {
"unit_of_measurement": "subscribers"
},
}
}
}

Check our backend localization documentation for details.