Skip to content

Commit

Permalink
Fixed line_value_below not working when assigned 0 #13
Browse files Browse the repository at this point in the history
  • Loading branch information
kalkih committed Dec 5, 2018
1 parent cc10236 commit b959d0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mini-graph-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b959d0f

Please sign in to comment.