Skip to content

Commit f222702

Browse files
authored
Fix entity name in statistics chart (#27896)
1 parent 2107b7c commit f222702

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/panels/lovelace/cards/hui-statistics-graph-card.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ export class HuiStatisticsGraphCard extends LitElement implements LovelaceCard {
175175
this._names = {};
176176
this._entities.forEach((config) => {
177177
const stateObj = this.hass!.states[config.entity];
178-
this._names[config.entity] = stateObj
179-
? computeLovelaceEntityName(this.hass!, stateObj, config.name)
180-
: config.entity;
178+
this._names[config.entity] =
179+
computeLovelaceEntityName(this.hass!, stateObj, config.name) ||
180+
config.entity;
181181
});
182182
}
183183

0 commit comments

Comments
 (0)