Move ZHA config panel section translations to the backend (#49816)

This commit is contained in:
David F. Mulcahey 2021-04-30 12:29:34 -04:00 committed by GitHub
parent 684ea9e49b
commit 4ed74cd2f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 0 deletions

View File

@ -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": {

View File

@ -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",

View File

@ -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),
),
}
)