From 81588469b8266fa7f2f5fc52fe2b885baba38787 Mon Sep 17 00:00:00 2001 From: Marius <33354141+Mariusthvdb@users.noreply.github.com> Date: Sat, 23 Nov 2019 21:19:26 +0100 Subject: [PATCH] Add secondary-info: last-triggered (#4222) * Add secondary-info: last-triggered add last-triggered to the currently available options 'entity-id' and 'last-changed' see:https://www.home-assistant.io/lovelace/entities/#secondary_info * corrected omission 'attributes' * added test for attributes.last_triggered * Update hui-generic-entity-row.ts * Update hui-generic-entity-row.ts --- src/panels/lovelace/components/hui-generic-entity-row.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/panels/lovelace/components/hui-generic-entity-row.ts b/src/panels/lovelace/components/hui-generic-entity-row.ts index f965b252d2..ac5c3c8a5f 100644 --- a/src/panels/lovelace/components/hui-generic-entity-row.ts +++ b/src/panels/lovelace/components/hui-generic-entity-row.ts @@ -105,6 +105,14 @@ class HuiGenericEntityRow extends LitElement { .datetime=${stateObj.last_changed} > ` + : this.config.secondary_info === "last-triggered" && + stateObj.attributes.last_triggered + ? html` + + ` : ""}