So recently I'm starting to dive more and more into customization and really loving the options with card_mod. But I'm having a hard time with trying to set the Icon and/or Text Color of a Badge through card_mod.
For example, the following Badge:
badges:
- type: entity
show_state: true
show_icon: true
entity: person.john_doe
state_content:
- name
- state
name: John
color: state
With the help of Claude AI, I tried adding card_mod on this one as followed, but it didn't do anything.:
card_mod:
style: |
:host {
{% if is_state('person.john_doe', 'home') %}
--ha-badge-color: green !important;
--ha-badge-text-color: green !important;
{% endif %}
}