Added tooltip to state badge element (#3137)

This commit is contained in:
Yosi Levy
2019-05-02 11:31:14 -07:00
committed by Paulus Schoutsen
parent 8a86dd8426
commit 8b98f375c2
2 changed files with 6 additions and 1 deletions
@@ -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>
`;
}
+1
View File
@@ -45,6 +45,7 @@ export interface ServiceButtonElementConfig extends LovelaceElementConfig {
export interface StateBadgeElementConfig extends LovelaceElementConfig {
entity: string;
title?: string;
}
export interface StateIconElementConfig extends LovelaceElementConfig {