diff --git a/src/panels/lovelace/cards/types.ts b/src/panels/lovelace/cards/types.ts index 8fb6bfeb7e..233cc65e3a 100644 --- a/src/panels/lovelace/cards/types.ts +++ b/src/panels/lovelace/cards/types.ts @@ -29,7 +29,12 @@ export interface EntityCardConfig extends LovelaceCardConfig { export interface EntitiesCardEntityConfig extends EntityConfig { type?: string; - secondary_info?: "entity-id" | "last-changed"; + secondary_info?: + | "entity-id" + | "last-changed" + | "last-triggered" + | "position" + | "tilt-position"; action_name?: string; service?: string; service_data?: object; diff --git a/src/panels/lovelace/components/hui-generic-entity-row.ts b/src/panels/lovelace/components/hui-generic-entity-row.ts index abc946bbce..fe154e0775 100644 --- a/src/panels/lovelace/components/hui-generic-entity-row.ts +++ b/src/panels/lovelace/components/hui-generic-entity-row.ts @@ -112,6 +112,16 @@ class HuiGenericEntityRow extends LitElement { : this.hass.localize( "ui.panel.lovelace.cards.entities.never_triggered" ) + : this.config.secondary_info === "position" && + stateObj.attributes.current_position !== undefined + ? `${this.hass.localize("ui.card.cover.position")}: ${ + stateObj.attributes.current_position + }` + : this.config.secondary_info === "tilt-position" && + stateObj.attributes.current_tilt_position !== undefined + ? `${this.hass.localize("ui.card.cover.tilt_position")}: ${ + stateObj.attributes.current_tilt_position + }` : "")} `