From 98dda8d38149f142c68a20e94c48eee5371b1467 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Tue, 15 Jul 2025 02:41:35 -0700 Subject: [PATCH] Document unit_of_measurement translation for number selector (#2716) --- docs/internationalization/core.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/internationalization/core.md b/docs/internationalization/core.md index 54b5d8d7..c32a237d 100644 --- a/docs/internationalization/core.md +++ b/docs/internationalization/core.md @@ -151,6 +151,23 @@ The translation for selectors are defined under the `selector` key. It supports ``` +The `unit_of_measurement` of a number selector may also be translated with a translation key: +```json +{ + // Translations for number selector to be used in option and config flows + "selector": { + // The key is linked to the `translation_key` that needs to be set + // using the NumberSelectorConfig class + "round_digits": { + // The translations for the number selector unit_of_measurement + "unit_of_measurement": { + "decimals": "decimals" + } + } + } +} +``` + ### Service Actions The translations of service actions strings are defined under the `services` key.