diff --git a/src/components/entity/ha-entity-picker.ts b/src/components/entity/ha-entity-picker.ts index 0cafed4191..231914cecf 100644 --- a/src/components/entity/ha-entity-picker.ts +++ b/src/components/entity/ha-entity-picker.ts @@ -38,15 +38,14 @@ const rowRenderer = ( } - + -
[[_computeStateName(item)]]
-
[[item.entity_id]]
+
+
`; } - root.querySelector("state-badge")!.stateObj = model.item; root.querySelector(".name")!.textContent = computeStateName(model.item); root.querySelector("[secondary]")!.textContent = model.item.entity_id; @@ -148,6 +147,10 @@ class HaEntityPicker extends LitElement { } ); + protected shouldUpdate(changedProps: PropertyValues) { + return !(!changedProps.has("_opened") && this._opened); + } + protected updated(changedProps: PropertyValues) { if (changedProps.has("_opened") && this._opened) { const states = this._getStates(