Skip to content

Commit

Permalink
Merge pull request #375 from flixlix/370-bug-clicking-grid-no-action
Browse files Browse the repository at this point in the history
fix: 🔥 default color_value
  • Loading branch information
flixlix authored Sep 11, 2023
2 parents f2e9e68 + 59f553f commit d90bb75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/power-flow-card-plus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -947,15 +947,15 @@ export class PowerFlowCardPlus extends LitElement {
grid.state.toBattery || 0 > 0 ? "var(--energy-grid-consumption-color)" : "var(--energy-grid-return-color)"
);

if (!entities.grid?.color_value) {
if (entities.grid?.color_value === false) {
this.style.setProperty("--text-grid-consumption-color", "var(--primary-text-color)");
this.style.setProperty("--text-grid-return-color", "var(--primary-text-color)");
} else {
this.style.setProperty("--text-grid-consumption-color", "var(--energy-grid-consumption-color)");
this.style.setProperty("--text-grid-return-color", "var(--energy-grid-return-color)");
}

if (!entities.battery?.color_value) {
if (entities.battery?.color_value === false) {
this.style.setProperty("--text-battery-in-color", "var(--primary-text-color)");
this.style.setProperty("--text-battery-out-color", "var(--primary-text-color)");
} else {
Expand Down

0 comments on commit d90bb75

Please sign in to comment.