Skip to content

Commit 428af67

Browse files
authored
0.2.0b0
lovelace GUI config fix
1 parent 4ffa5b5 commit 428af67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bar-card.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ class BarCard extends HTMLElement {
583583
sections.forEach(section => {
584584
if (numberValue <= section.value && !color) {
585585
const keys = Object.keys(section)
586-
if (keys[1] == 'color') color = section.color
586+
if (keys[0] == 'color' || keys[1] == 'color') color = section.color
587587
else color = 'hsl(' + section.hue + ',50%,50%)'
588588
}
589589
})
@@ -1031,4 +1031,4 @@ class BarCard extends HTMLElement {
10311031
}
10321032
}
10331033

1034-
customElements.define('bar-card', BarCard)
1034+
customElements.define('bar-card', BarCard)

0 commit comments

Comments
 (0)