mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 19:09:48 +00:00
Add title property to elements showing entity names (#9264)
This commit is contained in:
@@ -88,7 +88,7 @@ export class HaStateLabelBadge extends LitElement {
|
||||
entityState,
|
||||
this._timerTimeRemaining
|
||||
)}
|
||||
.description=${this.name ? this.name : computeStateName(entityState)}
|
||||
.description=${this.name ?? computeStateName(entityState)}
|
||||
></ha-label-badge>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -24,13 +24,15 @@ class StateInfo extends LitElement {
|
||||
return html``;
|
||||
}
|
||||
|
||||
const name = computeStateName(this.stateObj);
|
||||
|
||||
return html`<state-badge
|
||||
.stateObj=${this.stateObj}
|
||||
.stateColor=${true}
|
||||
></state-badge>
|
||||
<div class="info">
|
||||
<div class="name" .inDialog=${this.inDialog}>
|
||||
${computeStateName(this.stateObj)}
|
||||
<div class="name" .title=${name} .inDialog=${this.inDialog}>
|
||||
${name}
|
||||
</div>
|
||||
${this.inDialog
|
||||
? html`<div class="time-ago">
|
||||
|
||||
Reference in New Issue
Block a user