diff --git a/README.md b/README.md index 4c658d1..d38ea65 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ A simple card which displays energy usage details of one or multiple entities. - Variable amount of monitoring entities - Voltage, Current, Power, Frequency and Power Factor display - Automatic unit of measurement detection -- Adjustable colors, labels and icons +- Adjustable names, colors, labels and icons - Configurable dynamic animations adapting to power usage *Three-phase power monitoring example:* @@ -50,6 +50,7 @@ Direct configuration via YAML is also available. For details see below. | current | state entity | *Optional* | State entity for current | | | frequency | state entity | *Optional* | State entity for frequency | | | power_factor | state entity | *Optional* | State entity for power_factor | | +| name | string | *Optional* | Name label | | | icon_leading | string | *Optional* | Leading MD icon | `mdi:transmission-tower` | | icon_trailing | string | *Optional* | Trailing MD icon | `mdi:home-lightning-bolt` | | label_leading | string | *Optional* | Leading label | | diff --git a/src/energy-overview-card.ts b/src/energy-overview-card.ts index ae3783c..9eda40e 100644 --- a/src/energy-overview-card.ts +++ b/src/energy-overview-card.ts @@ -154,6 +154,7 @@ export class EnergyOverviewCard extends LitElement { frequency_unit: this._extractUnit(entity.frequency, UnitOfFrequency.HERTZ), power_factor: entity.power_factor ? states[entity.power_factor].state : undefined, power_factor_unit: this._extractUnit(entity.power_factor, ''), + name: entity.name ? entity.name : '', color: entity.color ? entity.color : 'var(--energy-grid-consumption-color)', label_trailing: entity.label_trailing ? entity.label_trailing : '', label_leading: entity.label_leading ? entity.label_leading : '', @@ -208,6 +209,7 @@ export class EnergyOverviewCard extends LitElement {