From 0f21dfadf18474dff8ec1220f6846484da54bdc8 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Mon, 5 Aug 2024 07:33:36 -0700 Subject: [PATCH] Dont load unnecessary translations for helper dialog (#21573) --- src/panels/config/helpers/dialog-helper-detail.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/panels/config/helpers/dialog-helper-detail.ts b/src/panels/config/helpers/dialog-helper-detail.ts index f5691709ca..537874fd33 100644 --- a/src/panels/config/helpers/dialog-helper-detail.ts +++ b/src/panels/config/helpers/dialog-helper-detail.ts @@ -123,13 +123,10 @@ export class DialogHelperDetail extends LitElement { this._opened = true; await this.updateComplete; this.hass.loadFragmentTranslation("config"); - Promise.all([ - getConfigFlowHandlers(this.hass, ["helper"]), - // Ensure the titles are loaded before we render the flows. - this.hass.loadBackendTranslation("title", undefined, true), - ]).then(([flows]) => { - this._helperFlows = flows; - }); + const flows = await getConfigFlowHandlers(this.hass, ["helper"]); + await this.hass.loadBackendTranslation("title", flows, true); + // Ensure the titles are loaded before we render the flows. + this._helperFlows = flows; } public closeDialog(): void {