From 9903e22eaa5c4bbcf1f72778124fe3eb446f93df Mon Sep 17 00:00:00 2001 From: Adam Kapos Date: Tue, 9 Apr 2024 15:11:58 +0300 Subject: [PATCH] Change tile to display "last triggered" in relative time (#20463) --- src/panels/lovelace/cards/hui-tile-card.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/panels/lovelace/cards/hui-tile-card.ts b/src/panels/lovelace/cards/hui-tile-card.ts index abb180dd35d5..2a08ce8f7500 100644 --- a/src/panels/lovelace/cards/hui-tile-card.ts +++ b/src/panels/lovelace/cards/hui-tile-card.ts @@ -245,6 +245,14 @@ export class HuiTileCard extends LitElement implements LovelaceCard { > `; } + if (content === "last_triggered") { + return html` + + `; + } if (stateObj.attributes[content] == null) { return undefined; }