diff --git a/docs/internationalization/core.md b/docs/internationalization/core.md index 98c81d40..5dab55f5 100644 --- a/docs/internationalization/core.md +++ b/docs/internationalization/core.md @@ -149,6 +149,23 @@ The translation strings for repairs issues are defined under the `issues` key. A ### Entities +#### Name of entities +Integrations can provide translations for names of its entities. To do this, provide an `entity` object, that contains translations of the names and set the entity's `translation_key` property to a key under a domain in the `entity` object. +If the entity's `translation_key` property is not `None` and the `entity` object provides a translated name, `EntityDescription.name` will be ignored. + +The following example `strings.json` is for a `sensor` entity with its `translation_key` property set to `thermostat_mode`: +```json +{ + "entity": { + "sensor": { + "thermostat_mode": { + "name": "Thermostat mode" + } + } + } +} +``` + #### State of entities Integrations can provide translations for states of its entities under other integrations like sensor if the base entity component does not provide translations, or if the translation provided by the base entity component do not match the integration's entity. To do this, provide an `entity` object, that contains translations for states and set the entity's `translation_key` property to a key under a domain in the `entity` object.