Skip to content

Commit d90bb75

Browse files
authored
Merge pull request #375 from flixlix/370-bug-clicking-grid-no-action
fix: 🔥 default color_value
2 parents f2e9e68 + 59f553f commit d90bb75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/power-flow-card-plus.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,15 +947,15 @@ export class PowerFlowCardPlus extends LitElement {
947947
grid.state.toBattery || 0 > 0 ? "var(--energy-grid-consumption-color)" : "var(--energy-grid-return-color)"
948948
);
949949

950-
if (!entities.grid?.color_value) {
950+
if (entities.grid?.color_value === false) {
951951
this.style.setProperty("--text-grid-consumption-color", "var(--primary-text-color)");
952952
this.style.setProperty("--text-grid-return-color", "var(--primary-text-color)");
953953
} else {
954954
this.style.setProperty("--text-grid-consumption-color", "var(--energy-grid-consumption-color)");
955955
this.style.setProperty("--text-grid-return-color", "var(--energy-grid-return-color)");
956956
}
957957

958-
if (!entities.battery?.color_value) {
958+
if (entities.battery?.color_value === false) {
959959
this.style.setProperty("--text-battery-in-color", "var(--primary-text-color)");
960960
this.style.setProperty("--text-battery-out-color", "var(--primary-text-color)");
961961
} else {

0 commit comments

Comments
 (0)