I have created my personal theme with card-background-color set to color Mirage and so on.
This theme I have assigned to my preferences and it’s working fine.
Now I would like to overrule this global theme for only 1 card.
This overruling changes something, but not in the right direction.
Here is my setup.
configuration.yaml
frontend:
themes: !include_dir_merge_named themes/
The themes folder has 2 files, one for my personal theme which is working fine on global level,
a 2nd one playground_themes.yaml with some playground themes in it, all for local assignement on card level.
Here the content of playground_themes.yaml
black_background_theme:
modes:
dark:
card-background-color: black;
primary-text-color: yellow;
light:
card-background-color: yellow;
primary-text-color: blue;
no_background_theme:
modes:
dark:
primary-text-color: yellow;
light:
primary-text-color: blue;
And here the card where I’m testing this theme:
type: entities
title: Playground Theme
entities:
- sun.sun
- sensor.moon_phase
theme: black_background_theme
The strange thing is, when I set the card theme to no_background_theme the background color is set to the default grey of HA.
And when I set the card theme to black_background_theme the background color is set to Mirage, which is the color from my global theme.
This means,
every card specific theme where I try to set the card-background-color will leave this color as it is defined by my global theme,
every card specific theme where I do not set the card-background-color will leave this color as it is defined by HA default,
but no card specific theme makes the expected change.
My question now, is it possible to overrule a global theme from user preference for any single card?
If yes, what could be my error.

