Use entity id as label in entity picker dev tools (#16484)

This commit is contained in:
Bram Kragten
2023-05-10 10:23:33 +02:00
committed by GitHub
parent 24fc2a0ccc
commit 3325cbfa28
2 changed files with 5 additions and 1 deletions

View File

@@ -102,6 +102,9 @@ export class HaEntityPicker extends LitElement {
@property({ type: Boolean }) public hideClearIcon = false;
@property({ attribute: "item-label-path" }) public itemLabelPath =
"friendly_name";
@state() private _opened = false;
@query("ha-combo-box", true) public comboBox!: HaComboBox;
@@ -300,7 +303,7 @@ export class HaEntityPicker extends LitElement {
return html`
<ha-combo-box
item-value-path="entity_id"
item-label-path="friendly_name"
.itemLabelPath=${this.itemLabelPath}
.hass=${this.hass}
.value=${this._value}
.label=${this.label === undefined