Allow placeholders in config and option flows (#9314)

This commit is contained in:
Joakim Sørensen 2021-06-30 01:09:18 +02:00 committed by GitHub
parent 377ebadc10
commit ed4052365c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -90,7 +90,10 @@ export const showConfigFlowDialog = (
},
renderShowFormStepFieldError(hass, step, error) {
return hass.localize(`component.${step.handler}.config.error.${error}`);
return hass.localize(
`component.${step.handler}.config.error.${error}`,
step.description_placeholders
);
},
renderExternalStepHeader(hass, step) {

View File

@ -88,9 +88,10 @@ export const showOptionsFlowDialog = (
);
},
renderShowFormStepFieldError(hass, _step, error) {
renderShowFormStepFieldError(hass, step, error) {
return hass.localize(
`component.${configEntry.domain}.options.error.${error}`
`component.${configEntry.domain}.options.error.${error}`,
step.description_placeholders
);
},