From b959d0f8da3f64a5a178c8348f5a2659317ee139 Mon Sep 17 00:00:00 2001 From: kalkih Date: Wed, 5 Dec 2018 03:18:41 +0100 Subject: [PATCH] Fixed line_value_below not working when assigned 0 #13 --- mini-graph-card.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mini-graph-card.js b/mini-graph-card.js index 1224fc4..7747645 100755 --- a/mini-graph-card.js +++ b/mini-graph-card.js @@ -159,8 +159,8 @@ class MiniGraphCard extends LitElement { const state = Number(this.entity.state) || 0; const above = this.config.line_value_above; const below = this.config.line_value_below; - if (above && state > above) return this.config.line_color_above - if (below && state < below) return this.config.line_color_below + if (above !== null && state > above) return this.config.line_color_above + if (below !== null && state < below) return this.config.line_color_below return this.config.line_color; }