Add keys initiate_flow and entry_type to data entry translations (#138882)

pull/139344/head
Erik Montnemery 2025-02-26 15:27:52 +01:00 committed by GitHub
parent bb120020a8
commit 7e97ef588b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -11,7 +11,6 @@
},
"config_subentries": {
"entity": {
"title": "Add entity",
"step": {
"add_sensor": {
"description": "Configure the new sensor",
@ -27,7 +26,12 @@
"state": "Initial state"
}
}
}
},
"initiate_flow": {
"user": "Add sensor",
"reconfigure": "Reconfigure sensor"
},
"entry_type": "Sensor"
}
},
"options": {

View File

@ -185,6 +185,8 @@ def gen_data_entry_schema(
vol.Optional("abort"): {str: translation_value_validator},
vol.Optional("progress"): {str: translation_value_validator},
vol.Optional("create_entry"): {str: translation_value_validator},
vol.Optional("initiate_flow"): {str: translation_value_validator},
vol.Optional("entry_type"): translation_value_validator,
}
if flow_title == REQUIRED:
schema[vol.Required("title")] = translation_value_validator
@ -289,7 +291,7 @@ def gen_strings_schema(config: Config, integration: Integration) -> vol.Schema:
gen_data_entry_schema(
config=config,
integration=integration,
flow_title=REQUIRED,
flow_title=REMOVED,
require_step_title=False,
),
slug_validator=vol.Any("_", cv.slug),