From 3b1f9a5dabee66e0ee0f3507e1899dc6c72c1f47 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 12 Mar 2020 20:09:41 +0100 Subject: [PATCH] Fix secondary info (#5159) --- .../components/hui-generic-entity-row.ts | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/panels/lovelace/components/hui-generic-entity-row.ts b/src/panels/lovelace/components/hui-generic-entity-row.ts index d05355ec5b..8889459310 100644 --- a/src/panels/lovelace/components/hui-generic-entity-row.ts +++ b/src/panels/lovelace/components/hui-generic-entity-row.ts @@ -94,27 +94,27 @@ class HuiGenericEntityRow extends LitElement { ? html`
${this.secondaryText || - this.config.secondary_info === "entity-id" - ? stateObj.entity_id - : this.config.secondary_info === "last-changed" - ? html` - - ` - : this.config.secondary_info === "last-triggered" - ? stateObj.attributes.last_triggered + (this.config.secondary_info === "entity-id" + ? stateObj.entity_id + : this.config.secondary_info === "last-changed" ? html` ` - : this.hass.localize( - "ui.panel.lovelace.cards.entities.never_triggered" - ) - : ""} + : this.config.secondary_info === "last-triggered" + ? stateObj.attributes.last_triggered + ? html` + + ` + : this.hass.localize( + "ui.panel.lovelace.cards.entities.never_triggered" + ) + : "")}
` : ""}