mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Add show_name to state label badge (#17603)
This commit is contained in:
parent
ee8997fbd2
commit
d50a130345
@ -62,6 +62,8 @@ export class HaStateLabelBadge extends LitElement {
|
||||
|
||||
@property() public image?: string;
|
||||
|
||||
@property() public showName?: boolean;
|
||||
|
||||
@state() private _timerTimeRemaining?: number;
|
||||
|
||||
private _connected?: boolean;
|
||||
@ -132,7 +134,9 @@ export class HaStateLabelBadge extends LitElement {
|
||||
entityState,
|
||||
this._timerTimeRemaining
|
||||
)}
|
||||
.description=${this.name ?? computeStateName(entityState)}
|
||||
.description=${this.showName === false
|
||||
? undefined
|
||||
: this.name ?? computeStateName(entityState)}
|
||||
>
|
||||
${!image && showIcon
|
||||
? html`<ha-state-icon
|
||||
|
@ -34,6 +34,7 @@ export class HuiStateLabelBadge extends LitElement implements LovelaceBadge {
|
||||
.name=${this._config.name}
|
||||
.icon=${this._config.icon}
|
||||
.image=${this._config.image}
|
||||
.showName=${this._config.show_name}
|
||||
@action=${this._handleAction}
|
||||
.actionHandler=${actionHandler({
|
||||
hasHold: hasAction(this._config!.hold_action),
|
||||
|
Loading…
x
Reference in New Issue
Block a user