We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ffa5b5 commit 428af67Copy full SHA for 428af67
bar-card.js
@@ -583,7 +583,7 @@ class BarCard extends HTMLElement {
583
sections.forEach(section => {
584
if (numberValue <= section.value && !color) {
585
const keys = Object.keys(section)
586
- if (keys[1] == 'color') color = section.color
+ if (keys[0] == 'color' || keys[1] == 'color') color = section.color
587
else color = 'hsl(' + section.hue + ',50%,50%)'
588
}
589
})
@@ -1031,4 +1031,4 @@ class BarCard extends HTMLElement {
1031
1032
1033
1034
-customElements.define('bar-card', BarCard)
+customElements.define('bar-card', BarCard)
0 commit comments