HA Core update 2025.5.1 alters custom button card background

Hi, I’ve just found that after updating HA core to 2025.5.1 from 2025.4.4 my custom card buttons have transparent backgrounds not color as normal. Anyone else have this issue? Any ideas to fix this? rolling back to 2025.4.4 returned everything normal. Hopefully uploaded pictures show this.
Currently
Core 2025.4.4
Supervisor 2025.05.1
OS 15.2
Frontend 20050411.0


Having similary problems…
Home Assistant dashboards after update to 2025.5.1 I can’t save any change
to dashboards anymore :cold_sweat: No updates available, no failures according to HA…
As soon as I try to edit a dashboard the save button in the right corner pops up and then disapears…

But there is a beta update for the bubble cards, it is a little bit better. Maybe for you a solution? @HDJedi

  • Core 2025.5.1
  • Supervisor 2025.05.1
  • Operating System 15.2
  • Frontend 20250509.0

I’ll take a look at the beta you mention but I’m not keen as I prefer to install final versions where possible. I’m happy to wait a bit as everything else is working ok. Thanks for the suggestion.

As an update, I just installed 2025.5.2 core update and unfortunately it gives the same result as previously, custom button backgrounds are again transparent :disappointed:

Post a SHORT MINIMAL code for your button which lost it’s background.

Here’s the YAML for one of the buttons that’s playing up.

type: custom:button-card
entity: light.bedroom_lights
icon: mdi:lightbulb-group-outline
name: All Bedroom Lights
color_type: card
color: rgb(137,207,240)
aspect_ratio: 3/0.65
tap_action:
  action: toggle
double_tap_action:
  action: more-info

Thanks for any help you can offer

Check with a default theme.

shows as this:

seems as you want it?

maybe you didnt check your themes for the changed theme variables?

I’m currently using “Home Assistant” Theme. I had a look at the link for changed themes variables but this seemed to talk about the paper variables etc. Being relatively new to Home Assistant I’m not sure what that means however,.

Under migrated tokens I found
–paper-item-icon-color → --state-icon-color

and looking at button-card.js I found
–state-inactive-color: var(–paper-item-icon-color);

do I need to change that to
–state-inactive-color: var(–state-item-color);

I haven’t done it yet as I’m not sure if it’s ok to do so.

Anyway, as you can see for some reason the dark blue with white lettering button that shows a light is off changes to a clear background with white lettering. The On state light blue background with black lettering is not affected after upgrade.
Here are my theme settings.

I updated to the latest 2025.5.3 but still no difference.
I then tried changing the button-card.js file with removing and replacing the paper reference as noted in previous post but still no difference.

If I can’t fix this is there another customisable button card I can use to replace the current card buttons?

I’m at a bit of a loss here, does anyone have any more ideas? I need plain instructions as this is all a bit tricky to work out. Thank you in advance.