From 50bea33a19a9bfdae3af99b70fbf81ce3f47b3cb Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 18 Jan 2022 14:18:22 -0800 Subject: [PATCH] Localize config flow title (#11358) --- src/data/config_flow.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/data/config_flow.ts b/src/data/config_flow.ts index 95af6f6e12..41842496d0 100644 --- a/src/data/config_flow.ts +++ b/src/data/config_flow.ts @@ -114,5 +114,8 @@ export const localizeConfigFlowTitle = ( args.push(key); args.push(placeholders[key]); }); - return localize(`component.${flow.handler}.config.flow_title`, ...args); + return localize(`component.${flow.handler}.config.flow_title`, ...args) || + "name" in placeholders + ? placeholders.name + : domainToName(localize, flow.handler); };