mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 03:06:41 +00:00
Change tile to display "last triggered" in relative time (#20463)
This commit is contained in:
parent
1e0f7d9629
commit
9903e22eaa
@ -245,6 +245,14 @@ export class HuiTileCard extends LitElement implements LovelaceCard {
|
|||||||
></ha-relative-time>
|
></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) {
|
if (stateObj.attributes[content] == null) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user