card-mod:
type: entities
entities:
- entity: light.bathroom_ceiling
- entity: light.koridor_ceiling
card_mod:
style:
hui-generic-entity-row $ state-badge $: |
ha-state-icon {
{% if is_state(config.entity,'on') %}
color: var(--paper-item-icon-active-color) !important;
filter: none !important;
{% endif %}
}
Since you need to use “config.entity
” - you CANNOT specify the style on the card’s level:
type: entities
entities:
- entity: light.bathroom_ceiling
- entity: light.koridor_ceiling
card_mod:
style:
xxxx
you have to repeat the code for every element instead:
type: entities
entities:
- entity: light.bathroom_ceiling
card_mod: &ref_style_light
style:
xxxx
- entity: light.koridor_ceiling
card_mod: *ref_style_light
For other cards like glance, picture-elements - do it similarly.
For details - please continue the discussion in the dedicated card-mod thread, let it be in one place.