diff --git a/src/panels/lovelace/cards/types.ts b/src/panels/lovelace/cards/types.ts index 1d3fbea65b..3ce3342309 100644 --- a/src/panels/lovelace/cards/types.ts +++ b/src/panels/lovelace/cards/types.ts @@ -34,7 +34,8 @@ export interface EntitiesCardEntityConfig extends EntityConfig { | "last-changed" | "last-triggered" | "position" - | "tilt-position"; + | "tilt-position" + | "brightness"; 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 fe154e0775..a33127ce02 100644 --- a/src/panels/lovelace/components/hui-generic-entity-row.ts +++ b/src/panels/lovelace/components/hui-generic-entity-row.ts @@ -122,6 +122,11 @@ class HuiGenericEntityRow extends LitElement { ? `${this.hass.localize("ui.card.cover.tilt_position")}: ${ stateObj.attributes.current_tilt_position }` + : this.config.secondary_info === "brightness" && + stateObj.attributes.brightness + ? html`${Math.round( + (stateObj.attributes.brightness / 255) * 100 + )}%` : "")} `