Add title property to elements showing entity names (#9264)

This commit is contained in:
Philip Allgaier
2021-10-06 17:41:37 +02:00
committed by GitHub
parent 8e010618bb
commit fb1deb838c
17 changed files with 53 additions and 40 deletions

View File

@@ -54,6 +54,7 @@ class HuiGenericEntityRow extends LitElement {
!DOMAINS_HIDE_MORE_INFO.includes(computeDomain(this.config.entity)));
const hasSecondary = this.secondaryText || this.config.secondary_info;
const name = this.config.name ?? computeStateName(stateObj);
return html`
<state-badge
@@ -82,8 +83,9 @@ class HuiGenericEntityRow extends LitElement {
hasHold: hasAction(this.config!.hold_action),
hasDoubleClick: hasAction(this.config!.double_tap_action),
})}
.title=${name}
>
${this.config.name || computeStateName(stateObj)}
${name}
${hasSecondary
? html`
<div class="secondary">