From 4ed74cd2f510e878422c78a66b07de2ca1edb181 Mon Sep 17 00:00:00 2001 From: "David F. Mulcahey" Date: Fri, 30 Apr 2021 12:29:34 -0400 Subject: [PATCH] Move ZHA config panel section translations to the backend (#49816) --- homeassistant/components/zha/strings.json | 13 +++++++++++++ homeassistant/components/zha/translations/en.json | 13 +++++++++++++ script/hassfest/translations.py | 6 ++++++ 3 files changed, 32 insertions(+) diff --git a/homeassistant/components/zha/strings.json b/homeassistant/components/zha/strings.json index 550fad3c2c5..2c2a93aa4d6 100644 --- a/homeassistant/components/zha/strings.json +++ b/homeassistant/components/zha/strings.json @@ -29,6 +29,19 @@ "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]" } }, + "config_panel": { + "zha_options": { + "title": "Global Options", + "enable_identify_on_join": "Enable identify effect when devices join the network", + "default_light_transition": "Default light transition time (seconds)" + }, + "zha_alarm_options": { + "title": "Alarm Control Panel Options", + "alarm_master_code": "Master code for the alarm control panel(s)", + "alarm_failed_tries": "The number of consecutive failed code entries to trigger an alarm", + "alarm_arm_requires_code": "Code required for arming actions" + } + }, "device_automation": { "action_type": { "squawk": "Squawk", "warn": "Warn" }, "trigger_type": { diff --git a/homeassistant/components/zha/translations/en.json b/homeassistant/components/zha/translations/en.json index d3ed2ddfce4..2a6aa34d886 100644 --- a/homeassistant/components/zha/translations/en.json +++ b/homeassistant/components/zha/translations/en.json @@ -33,6 +33,19 @@ } } }, + "config_panel": { + "zha_alarm_options": { + "alarm_arm_requires_code": "Code required for arming actions", + "alarm_failed_tries": "The number of consecutive failed code entries to trigger an alarm", + "alarm_master_code": "Master code for the alarm control panel(s)", + "title": "Alarm Control Panel Options" + }, + "zha_options": { + "default_light_transition": "Default light transition time (seconds)", + "enable_identify_on_join": "Enable identify effect when devices join the network", + "title": "Global Options" + } + }, "device_automation": { "action_type": { "squawk": "Squawk", diff --git a/script/hassfest/translations.py b/script/hassfest/translations.py index b7a6341d25c..4143d61ca5d 100644 --- a/script/hassfest/translations.py +++ b/script/hassfest/translations.py @@ -142,6 +142,12 @@ def gen_strings_schema(config: Config, integration: Integration): vol.Optional("system_health"): { vol.Optional("info"): {str: cv.string_with_no_html} }, + vol.Optional("config_panel"): cv.schema_with_slug_keys( + cv.schema_with_slug_keys( + cv.string_with_no_html, slug_validator=lowercase_validator + ), + slug_validator=vol.Any("_", cv.slug), + ), } )