mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 19:26:36 +00:00
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
This commit is contained in:
parent
70a920af3c
commit
81588469b8
@ -105,6 +105,14 @@ class HuiGenericEntityRow extends LitElement {
|
||||
.datetime=${stateObj.last_changed}
|
||||
></ha-relative-time>
|
||||
`
|
||||
: this.config.secondary_info === "last-triggered" &&
|
||||
stateObj.attributes.last_triggered
|
||||
? html`
|
||||
<ha-relative-time
|
||||
.hass=${this.hass}
|
||||
.datetime=${stateObj.attributes.last_triggered}
|
||||
></ha-relative-time>
|
||||
`
|
||||
: ""}
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user