Skip to content

Commit

Permalink
Change tile to display "last triggered" in relative time (#20463)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nezz authored Apr 9, 2024
1 parent 1e0f7d9 commit 9903e22
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/panels/lovelace/cards/hui-tile-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,14 @@ export class HuiTileCard extends LitElement implements LovelaceCard {
></ha-relative-time>
`;
}
if (content === "last_triggered") {
return html`
<ha-relative-time
.hass=${this.hass}
.datetime=${stateObj.attributes.last_triggered}
></ha-relative-time>
`;
}
if (stateObj.attributes[content] == null) {
return undefined;
}
Expand Down

0 comments on commit 9903e22

Please sign in to comment.