HI,
using the # for the header in Markdown card normally works just fine. I now have a template for the color though which doesnt work nicely with the # and I ask the community for assistance please. What should I change t get it working as it should
- type: markdown
content: >
# <font color= {% set vandaag = states('sensor.afval_vandaag') %}
{% if vandaag == 'Papier' %} '#00b2ef'
{% elif vandaag == 'Gft' %} green
{% elif vandaag == 'Plastic' %} orange
{% elif vandaag == 'Restafval' %} black
{% else %} grey
{% endif %} >Afvalwijzer</font>
without the # works alright, And the template is alright.
the word Afvalwijzer is formatted green, as it should be.
using the #connected to the template results in:
adding a space between the # and the template:
please have a look?
this is what Id like to see:
which does work with a template like this:
- type: markdown
content: >
# <font color = {{'green' if states('sensor.trash_firstdate') == 'vandaag' else 'grey'}}>Afvalwijzer</font>
creating an extra template sensor and use that for the font color:
- type: markdown
content: >
# <font color = {{states('sensor.trash_color')}}>Afvalwijzer</font>
works alright.
So what did I do wrong, and why wonât it work with the templateâŠ
thanks