Added tooltip to state badge element (#3137)
This commit is contained in:
parent
8a86dd8426
commit
8b98f375c2
|
@ -56,7 +56,11 @@ export class HuiStateBadgeElement extends LitElement
|
|||
<ha-state-label-badge
|
||||
.hass="${this.hass}"
|
||||
.state="${stateObj}"
|
||||
.title="${computeStateName(stateObj)}"
|
||||
.title="${this._config.title === undefined
|
||||
? computeStateName(stateObj)
|
||||
: this._config.title === null
|
||||
? ""
|
||||
: this._config.title}"
|
||||
></ha-state-label-badge>
|
||||
`;
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ export interface ServiceButtonElementConfig extends LovelaceElementConfig {
|
|||
|
||||
export interface StateBadgeElementConfig extends LovelaceElementConfig {
|
||||
entity: string;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface StateIconElementConfig extends LovelaceElementConfig {
|
||||
|
|
Loading…
Reference in New Issue