mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Fix secondary info (#5159)
This commit is contained in:
parent
f54cd18da4
commit
3b1f9a5dab
@ -94,27 +94,27 @@ class HuiGenericEntityRow extends LitElement {
|
|||||||
? html`
|
? html`
|
||||||
<div class="secondary">
|
<div class="secondary">
|
||||||
${this.secondaryText ||
|
${this.secondaryText ||
|
||||||
this.config.secondary_info === "entity-id"
|
(this.config.secondary_info === "entity-id"
|
||||||
? stateObj.entity_id
|
? stateObj.entity_id
|
||||||
: this.config.secondary_info === "last-changed"
|
: this.config.secondary_info === "last-changed"
|
||||||
? html`
|
|
||||||
<ha-relative-time
|
|
||||||
.hass=${this.hass}
|
|
||||||
.datetime=${stateObj.last_changed}
|
|
||||||
></ha-relative-time>
|
|
||||||
`
|
|
||||||
: this.config.secondary_info === "last-triggered"
|
|
||||||
? stateObj.attributes.last_triggered
|
|
||||||
? html`
|
? html`
|
||||||
<ha-relative-time
|
<ha-relative-time
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.datetime=${stateObj.attributes.last_triggered}
|
.datetime=${stateObj.last_changed}
|
||||||
></ha-relative-time>
|
></ha-relative-time>
|
||||||
`
|
`
|
||||||
: this.hass.localize(
|
: this.config.secondary_info === "last-triggered"
|
||||||
"ui.panel.lovelace.cards.entities.never_triggered"
|
? stateObj.attributes.last_triggered
|
||||||
)
|
? html`
|
||||||
: ""}
|
<ha-relative-time
|
||||||
|
.hass=${this.hass}
|
||||||
|
.datetime=${stateObj.attributes.last_triggered}
|
||||||
|
></ha-relative-time>
|
||||||
|
`
|
||||||
|
: this.hass.localize(
|
||||||
|
"ui.panel.lovelace.cards.entities.never_triggered"
|
||||||
|
)
|
||||||
|
: "")}
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user