was experimenting a bit, and because of the use of anchors, I simply tried this, without knowing it is not documented or checking the docs:
notice the use of entity in the markdown, and its subsequent use in the content, and in the card_mod templates.
It works as hoped for, and then I checked the docs for Markdown which mentions entity_id as a list https://www.home-assistant.io/dashboards/markdown/#entity_id
- type: horizontal-stack
cards:
- type: markdown
entity: sensor.pollen_onkruid_concentratie
<<: &md
card_mod:
style: |
ha-card {
background: rgb(128,193,177,0.8);
color:
{% set level = states(config.entity) %}
{% set color =
{'Laag':'green','Gemiddeld':'orange',
'Hoog':'darkorange','Zeer Hoog':'maroon'} %}
{% set level_color = color.get(level,'gray') %}
{{level_color}};
font-weight: 800;
text-align: center;
}
content: >
{{states(config.entity)}}
- type: markdown
entity: sensor.pollen_gras_concentratie
<<: *md
- type: markdown
entity: sensor.pollen_bomen_concentratie
<<: *md
just so you see this actually works: