mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-05 09:00:11 +00:00
Show less information in picked targets (#27600)
Do not show num device and entity domain
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user