From 67a91b7c19fa70f0df791367a98cd80f5521bad3 Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Sat, 25 Jan 2020 00:21:31 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20color=20lights=20unless=20explic?= =?UTF-8?q?itly=20set=20not=20to=20(#4603)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/entity/state-badge.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/entity/state-badge.ts b/src/components/entity/state-badge.ts index 516a5ed814..d000865d5d 100644 --- a/src/components/entity/state-badge.ts +++ b/src/components/entity/state-badge.ts @@ -35,11 +35,15 @@ class StateBadge extends LitElement { return html``; } + const domain = computeStateDomain(stateObj); + return html` 10) { iconStyle.color = `hsl(${hue}, 100%, ${100 - sat / 2}%)`; } } - if (stateObj.attributes.brightness) { + if (stateObj.attributes.brightness && this.stateColor !== false) { const brightness = stateObj.attributes.brightness; if (typeof brightness !== "number") { const errorMessage = `Type error: state-badge expected number, but type of ${