I am trying to add templates to the card mod addon for home assistant and having a hard time.
I would assume the template would be something like this (lines between [/u]** below) but it doesn’t result in any change. Would anyone be able to point me in the right direction with this?
- type: custom:mushroom-template-card
primary: Name
secondary: ''
icon: |2-
{% if is_state('person.Name', 'not_home') %}
mdi:home-export-outline
{% elif is_state('person.Name', 'Work') %}
mdi:office-building
{%else%}
mdi:home
{%endif%}
entity: person.Name
icon_color: |2-
{% if is_state('person.Name', 'not_home') %}
red
{% elif is_state('person.Name', 'Work') %}
blue
{%else%}
green
{%endif%}
card_mod:
style: |
ha-card {
--icon-size: 40px;
**[u] {% if is_state('person.Name', 'Work') %} [/u]**
**[u] --ha-card-background: rgba(0, 0, 0, 0); [/u]**
**[u] {%else%} [/u]**
**[u] --ha-card-background: rgba(12, 12, 12, 0); [/u]**
**[u] {%endif%} [/u]**
--secondary-text-color: white;
border: solid 1px grey;
border-radius: 25px;
}