From 7e7e86ac871ecccde03315d86ede9b702baac7e9 Mon Sep 17 00:00:00 2001 From: Steve Repsher Date: Wed, 14 Feb 2024 19:56:44 +0000 Subject: [PATCH] Revert to minimal change just to pass false state_color --- src/panels/lovelace/cards/hui-entities-card.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/panels/lovelace/cards/hui-entities-card.ts b/src/panels/lovelace/cards/hui-entities-card.ts index 32ad28f9b5a1..4fb12c466175 100644 --- a/src/panels/lovelace/cards/hui-entities-card.ts +++ b/src/panels/lovelace/cards/hui-entities-card.ts @@ -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! + ? ({ + state_color: this._config.state_color, + ...(entityConf as EntityConfig), + } as EntityConfig) + : entityConf + ); if (this._hass) { element.hass = this._hass; }