Hello, I use the following card_mod sequence in common entities cards to colorize icon, text and state separately:
card_mod:
style:
hui-generic-entity-row $: |
{% if states(config.entity) == 'ok' %}
state-badge {
color: blue;
}
.info {
color: green;
}
.state {
color: red;
}
{% endif %
However if I change entity type to template-entity-row it doesn’t colorize anymore:
type: custom:template-entity-row
card_mod:
style:
hui-generic-entity-row $: |
{% if states(config.entity) == 'ok' %}
state-badge {
color: blue;
}
.info {
color: green;
}
.state {
color: red;
}
{% endif %}
I tried a lot of options and searched the internet for a solution but couldn’t find one.
At the end I analyzed dashboard with browser developer tools and tried to address #wrapper DOM object:
type: custom:template-entity-row
card_mod:
style:
'#wrapper':
$: |
{% if states(config.entity) == 'ok' %}
state-badge {
color: blue;
}
.info {
color: green;
}
.state {
color: red;
}
{% endif %}
Unfortunately this doesn’t work neither.
Any ideas how to get colorization work in template-entity-row?