From fbee4937a0ed8a7d6f6eb9839a38ee4b12962f0a Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Sat, 19 Oct 2019 07:25:14 -0500 Subject: [PATCH] add icon option to entities card name (#4024) * add icon option to entities card name * account for only icon * address comments --- .../lovelace/cards/hui-entities-card.ts | 23 +++++++++++++++---- src/panels/lovelace/cards/types.ts | 1 + 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/panels/lovelace/cards/hui-entities-card.ts b/src/panels/lovelace/cards/hui-entities-card.ts index 15f5762029..cc680c8d60 100644 --- a/src/panels/lovelace/cards/hui-entities-card.ts +++ b/src/panels/lovelace/cards/hui-entities-card.ts @@ -82,16 +82,27 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard { if (!this._config || !this._hass) { return html``; } - const { show_header_toggle, title } = this._config; return html` - ${!title && !show_header_toggle + ${!this._config.title && + !this._config.show_header_toggle && + !this._config.icon ? html`` : html`
-
${title}
- ${show_header_toggle === false +
+ ${this._config.icon + ? html` + + ` + : ""} + ${this._config.title} +
+ ${this._config.show_header_toggle === false ? html`` : html`