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