Fix state-label-badge override name (#4166)

This commit is contained in:
Bram Kragten 2019-11-01 18:54:14 +01:00 committed by Ian Richardson
parent b705de956e
commit 9b3891f778

View File

@ -11,7 +11,6 @@ import "../components/hui-warning-element";
import { LovelaceBadge } from "../types";
import { HomeAssistant } from "../../../types";
import { computeStateName } from "../../../common/entity/compute_state_name";
import { StateLabelBadgeConfig } from "./types";
import { longPress } from "../common/directives/long-press-directive";
import { hasDoubleClick } from "../common/has-double-click";
@ -37,11 +36,7 @@ export class HuiStateLabelBadge extends LitElement implements LovelaceBadge {
<ha-state-label-badge
.hass=${this.hass}
.state=${stateObj}
.title=${this._config.name
? this._config.name
: stateObj
? computeStateName(stateObj)
: ""}
.name=${this._config.name}
.icon=${this._config.icon}
.image=${this._config.image}
@ha-click=${this._handleClick}