Fix domain not translated in entity picker and quick bar (#25444)

* Fix domain not translated in entity picker

* Remove unused param
This commit is contained in:
Paul Bottein
2025-05-13 07:54:31 +02:00
committed by GitHub
parent 04e736a51e
commit 2e5c6a4d3f
2 changed files with 28 additions and 17 deletions

View File

@@ -1,6 +1,13 @@
import { mdiClose, mdiMenuDown, mdiShape } from "@mdi/js";
import type { ComboBoxLightOpenedChangedEvent } from "@vaadin/combo-box/vaadin-combo-box-light";
import { css, html, LitElement, nothing, type CSSResultGroup } from "lit";
import {
css,
html,
LitElement,
nothing,
type CSSResultGroup,
type PropertyValues,
} from "lit";
import { customElement, property, query, state } from "lit/decorators";
import { fireEvent } from "../../common/dom/fire_event";
import { stopPropagation } from "../../common/dom/stop_propagation";
@@ -106,6 +113,12 @@ export class HaEntityPicker extends LitElement {
@state() private _opened = false;
protected firstUpdated(changedProperties: PropertyValues): void {
super.firstUpdated(changedProperties);
// Load title translations so it is available when the combo-box opens
this.hass.loadBackendTranslation("title");
}
private _renderContent() {
const entityId = this.value || "";