add never_triggered (#4442)

* add never_triggered

Add never_triggered to the last-triggered secondary_info.
as it stands, the secondary_info line is empty when used on an automation or script that hasn't been triggered yet, while the user expects info on that line.

* add "never_triggered"

for automation and script, to use in secondary_info
add last_triggered on script, because it was missing

* delete spaces

* add 2 spaces

travis check

* travis check row 116

* add never_triggered

to entities, delete incorrect entries to automation and script

* Update src/translations/en.json

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/panels/lovelace/components/hui-generic-entity-row.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update src/panels/lovelace/components/hui-generic-entity-row.ts

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Update en.json

* Update hui-generic-entity-row.ts

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Ian Richardson <iantrich@gmail.com>
This commit is contained in:
Marius
2020-01-21 08:21:32 -06:00
committed by Ian Richardson
co-authored by Bram Kragten Ian Richardson
parent 38be488f86
commit eeced628b3
2 changed files with 14 additions and 8 deletions
@@ -108,14 +108,17 @@ 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>
`
: 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>
`
: this.hass.localize(
"ui.panel.lovelace.cards.entities.never_triggered"
)
: ""}
</div>
</div>
+3
View File
@@ -1597,6 +1597,9 @@
"no_devices": "This page allows you to control your devices, however it looks like you have no devices set up yet. Head to the integrations page to get started.",
"go_to_integrations_page": "Go to the integrations page."
},
"entities": {
"never_triggered": "Never triggered"
},
"shopping-list": {
"checked_items": "Checked items",
"clear_items": "Clear checked items",