Energy-usage-graph card: custom colors won't since 2025.2

Hi all, I was used to use the folowing code on my energy-graph-card to display my electricity consumption with a color code related to the different tariffs 5blue, white, red)

It’s been working great for months and since 2025.2, the bars are now white and it looks like the color is only applied to the border.

type: custom:button-card
template: frame
padding-bottom: 1px
custom_fields:
  buttons:
    card:
      type: energy-usage-graph
      card_mod:
        style: |
          ha-card {
            background-color: transparent;
            border: transparent;
      energy-grid-consumption-color-0: rgba(var(--my-blue),0.4)
      energy-grid-consumption-color-1: rgba(var(--my-blue),0.7)
      energy-grid-consumption-color-2: rgba(var(--my-grey),0.2)
      energy-grid-consumption-color-3: rgba(var(--my-grey),0.4)
      energy-grid-consumption-color-4: rgba(var(--my-red),0.4)
      energy-grid-consumption-color-5: rgba(var(--my-red),0.7)
card_mod:
  class: soft-ui
  style: |
    ha-card {
      --primary-text-color: rgb(var(--my-grey));   
    }

It is probably related to cardmod because setting those colors in my theme, the colors will work just fine in the Energy dashboard.

So here is the Energy dashboard (result expected):

And this is what I have in my energy-usage-graph card that was used to work:

image

Any idea?
Thanks

Probably this card was changed along with a migration to Echarts.js. And probably you cannot use these “energy-grid-consumption-color-xxx” variables anymore, no idea.
Ask on Github about this regression.

interesting. Didn’t know they moved to Echarts.js.
Which github are you talking about? Echarts?

Thanks

These are closed PRs with “echarts” keyword, perhaps this info may give you hints:
https://github.com/home-assistant/frontend/pulls?q=is%3Apr+echarts+is%3Aclosed

1 Like

Hello,

I have the same problem as you, have you found a solution
It’s even more catastrophic when you use a theme, the display of individual measures no longer works correctly

Has anyone made a github issue yet?

I was on a business trio this week so I didn’t find a solution and dind’t create a github issue yet