From a1748260d31108d501193acffe563da58806e49b Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Thu, 20 Jul 2023 07:15:59 -0700 Subject: [PATCH] Always show translated labels for ha-form-multi_select (#17360) --- src/components/ha-form/ha-form-multi_select.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/ha-form/ha-form-multi_select.ts b/src/components/ha-form/ha-form-multi_select.ts index e56d902b9761..66c7d60ca6c0 100644 --- a/src/components/ha-form/ha-form-multi_select.ts +++ b/src/components/ha-form/ha-form-multi_select.ts @@ -91,7 +91,11 @@ export class HaFormMultiSelect extends LitElement implements HaFormElement { slot="trigger" .label=${this.label} .value=${data - .map((value) => this.schema.options![value] || value) + .map( + (value) => + optionLabel(options.find((v) => optionValue(v) === value)) || + value + ) .join(", ")} .disabled=${this.disabled} tabindex="-1"