Skip to content

Commit

Permalink
Restore type assertion hack and remove conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
steverep committed Feb 12, 2024
1 parent a9e7fdb commit 4fb5fc1
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/panels/lovelace/cards/hui-entities-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,10 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard {
}

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

0 comments on commit 4fb5fc1

Please sign in to comment.