Skip to content

Commit

Permalink
Revert to minimal change just to pass false state_color
Browse files Browse the repository at this point in the history
  • Loading branch information
steverep committed Feb 14, 2024
1 parent e8245cb commit 9efe1ff
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/panels/lovelace/cards/hui-entities-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,15 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard {
}

private renderEntity(entityConf: LovelaceRowConfig): TemplateResult {
const element = createRowElement({
state_color: this._config!.state_color,
...(entityConf as EntityConfig),
} as EntityConfig);
const element = createRowElement(
(!("type" in entityConf) || entityConf.type === "conditional") &&
"state_color" in this._config

Check failure on line 300 in src/panels/lovelace/cards/hui-entities-card.ts

View workflow job for this annotation

GitHub Actions / Lint and check format

Object is possibly 'undefined'.
? ({
state_color: this._config.state_color,
...(entityConf as EntityConfig),
} as EntityConfig)
: entityConf
);
if (this._hass) {
element.hass = this._hass;
}
Expand Down

0 comments on commit 9efe1ff

Please sign in to comment.