[BUG] "alarm_control_panel" state colors not respected in dark mode after 2025.5

Hi everyone,

After updating to Home Assistant 2025.5, I noticed that the custom colors defined in my theme for alarm_control_panel states are no longer being respected in dark mode. They still work correctly in light mode.

Here is an excerpt from my theme:

state-alarm_control_panel-disarmed-color: '#4CAF50'
state-alarm_control_panel-armed_home-color: '#F44336'
state-alarm_control_panel-armed_away-color: '#F44336'
state-alarm_control_panel-arming-color: '#FFC107'
state-alarm_control_panel-pending-color: '#FFC107'
state-alarm_control_panel-triggered-color: '#B71C1C'

These colors worked perfectly in both modes before the update. After moving to 2025.5, dark mode seems to ignore these values and falls back to the system default colors, while light mode still applies the custom ones correctly.

I’ve double-checked that all variable names are correct and reloaded the themes multiple times. The issue seems to affect the native alarm-panel-card.

Is anyone else experiencing this? Could it be related to the theme variable changes introduced in 2025.5?

Appreciate any input or confirmation from other users—or devs who might look into this.

Thanks!

My custom alarm panel colours are still being applied but I don’t use “modes”. I have separate themes for day and night that are switched by automation.

If it does turn out to be a real issue it can be reported here:

I could try made separate themes…Are your states colours defined as mines?

Petty much. I have just renamed one of the alarm modes from away to night. Shouldn’t make any difference.

  state-alarm_control_panel-armed_away-color: '#e45e65' # red
  state-alarm_control_panel-armed_night-color: '#039be5' # blue
  state-alarm_control_panel-armed_custom_bypass-color: '#e0b400' # yellow
  state-alarm_control_panel-arming-color: '#ff8000' # orange
  state-alarm_control_panel-disarmed-color: '#0da035' # green
  state-alarm_control_panel-disarming-color: '#ff8000' # orange
  state-alarm_control_panel-pending-color: '#ff8000' # orange
  state-alarm_control_panel-triggered-color: '#e45e65' # red
1 Like

I don’t have any issue with dark mode.

testtheme:
  modes:
    dark:
      state-alarm_control_panel-armed_home-color: "#F44336"

I have no idea if the problem’s with my alarm panel or HA setup…

It’s driving me crazy.

Funny thing is, in the alarm card preview it looks fine, but once I save it to the frontend, it doesn’t keep the custom color :sob:

Alright, after checking raw configuration of my frontend, I realized that some of my older views had “theme: Backend-selected” set.

When I created the alarm card in one of the views without that setting, custom colors worked as expected.

So, after removing that setting from all views, it looks like the issue is resolved.

Thank you everyone for your help.