Show less information in picked targets (#27600)

Do not show num device and entity domain
This commit is contained in:
Wendelin
2025-10-23 09:55:51 +02:00
committed by GitHub
parent 1ad226d608
commit 699c25a6c3

View File

@@ -114,7 +114,6 @@ export class HaTargetPickerItemRow extends LitElement {
const { name, context, iconPath, fallbackIconPath, stateObject } = const { name, context, iconPath, fallbackIconPath, stateObject } =
this._itemData(this.type, this.itemId); this._itemData(this.type, this.itemId);
const showDevices = ["floor", "area", "label"].includes(this.type);
const showEntities = this.type !== "entity"; const showEntities = this.type !== "entity";
const entries = this.parentEntries || this._entries; const entries = this.parentEntries || this._entries;
@@ -168,8 +167,7 @@ export class HaTargetPickerItemRow extends LitElement {
>${this._domainName}</span >${this._domainName}</span
>` >`
: nothing} : nothing}
${!this.subEntry && ${!this.subEntry && entries && showEntities
((entries && (showEntities || showDevices)) || this._domainName)
? html` ? html`
<div slot="end" class="summary"> <div slot="end" class="summary">
${showEntities && ${showEntities &&
@@ -193,21 +191,6 @@ export class HaTargetPickerItemRow extends LitElement {
)} )}
</span>` </span>`
: nothing} : nothing}
${showDevices
? html`<span class="secondary"
>${this.hass.localize(
"ui.components.target-picker.devices_count",
{
count: entries?.referenced_devices.length,
}
)}</span
>`
: nothing}
${this._domainName && !showDevices
? html`<span class="secondary domain"
>${this._domainName}</span
>`
: nothing}
</div> </div>
` `
: nothing} : nothing}