Funny that is about the only card that isn’t affected in my config…
What is your Yaml for that particular card @Mariusthvdb
type: vertical-stack
card_mod: !include /config/dashboard/card_mods/stack_card_gap_shadow.yaml
visibility:
- condition: numeric_state
entity: sensor.watchman_missing_entities
above: 0
cards:
- type: heading
heading: Watchman report
card_mod:
class: class-heading
- type: markdown
card_mod:
style: |
ha-card {
overflow-y: scroll;
max-height: {{states('input_number.max_scroll_hoogte')}}px;
color: var(--primary-color);
}
content: >-
{% set missing = states('sensor.watchman_missing_entities')|int(-1) %}
{% set type = 'error' if missing != 0 else 'info' %}
<h3><ha-alert alert-type={{type}}><ha-icon icon=mdi:shield-half-full></ha-icon>
Missing Entities: {{states('sensor.watchman_missing_entities')}} </ha-alert></h3>
{%- for item in state_attr('sensor.watchman_missing_entities','entities') %}
<hr> <table><tr> <td>
<ha-icon icon=mdi:
{%- if item %}
{%- if item.state=='missing' -%} cloud-alert
{%- elif item.state=='unavail' -%} cloud-off-outline
{%- else -%} cloud-question
{%- endif -%} ></ha-icon>
{%- else -%} help
{% endif %}
{{item.id}} [{{item.state}}] <a title='{{item.occurrences}}'>
{{item.occurrences.split('/')[-1].split(':')[0]}}</a>
</td></tr></table>
{% endfor %}
but 2025.12.1 is out now, so lets see what Fix markdown sections and styling by MindFreeze · Pull Request #28333 · home-assistant/frontend · GitHub will change ![]()
edit
well, no changes, still seeing the huge Nina picture
Still seeing the borders also in 2025.12.1
Actually seeing this in the log
Logger: homeassistant.helpers.event
Source: helpers/template/__init__.py:463
First occurred: 6:09:01 PM (16 occurrences)
Last logged: 6:09:02 PM
Error while processing template: Template<template=(<table width="100%"></br> <thead></br> <tr></br> <th align="left">Weeds</th></br> <th align="left">Value</th></br> <th align="left">Level</th></br> </tr></br> </thead></br> <tbody></br>{% set pollen = state_attr('sensor.kleenex_pollen_radar_kish_home_weeds','details') %}{% for weed in pollen %}</br> <tr></br> <td>{{ weed.name }}</td></br> <td>{{ weed.value }}</td></br> <td>{{ weed.level }}</td></br> </tr></br>{% endfor %}</br> </tbody></br></table>) renders=40>
Error while processing template: Template<template=(<table width="100%"></br> <thead></br> <tr></br> <th align="left">Weeds</th></br> <th align="left">Value</th></br> <th align="left">Level</th></br> </tr></br> </thead></br> <tbody></br>{% set pollen = state_attr('sensor.kleenex_pollen_radar_kish_home_weeds','details') %}{% for weed in pollen %}</br> <tr></br> <td>{{ weed.name }}</td></br> <td>{{ weed.value }}</td></br> <td>{{ weed.level }}</td></br> </tr></br>{% endfor %}</br> </tbody></br></table>) renders=42>
Error while processing template: Template<template=(<table width="100%"></br> <thead></br> <tr></br> <th align="left">Weeds</th></br> <th align="left">Value</th></br> <th align="left">Level</th></br> </tr></br> </thead></br> <tbody></br>{% set pollen = state_attr('sensor.kleenex_pollen_radar_kish_home_weeds','details') %}{% for weed in pollen %}</br> <tr></br> <td>{{ weed.name }}</td></br> <td>{{ weed.value }}</td></br> <td>{{ weed.level }}</td></br> </tr></br>{% endfor %}</br> </tbody></br></table>) renders=44>
Error while processing template: Template<template=(<table width="100%"></br> <thead></br> <tr></br> <th align="left">Weeds</th></br> <th align="left">Value</th></br> <th align="left">Level</th></br> </tr></br> </thead></br> <tbody></br>{% set pollen = state_attr('sensor.kleenex_pollen_radar_kish_home_weeds','details') %}{% for weed in pollen %}</br> <tr></br> <td>{{ weed.name }}</td></br> <td>{{ weed.value }}</td></br> <td>{{ weed.level }}</td></br> </tr></br>{% endfor %}</br> </tbody></br></table>) renders=46>
Error while processing template: Template<template=(<table width="100%"></br> <thead></br> <tr></br> <th align="left">Weeds</th></br> <th align="left">Value</th></br> <th align="left">Level</th></br> </tr></br> </thead></br> <tbody></br>{% set pollen = state_attr('sensor.kleenex_pollen_radar_kish_home_weeds','details') %}{% for weed in pollen %}</br> <tr></br> <td>{{ weed.name }}</td></br> <td>{{ weed.value }}</td></br> <td>{{ weed.level }}</td></br> </tr></br>{% endfor %}</br> </tbody></br></table>) renders=48>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template/__init__.py", line 461, in async_render
render_result = render_with_context(self.template, compiled, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/template/context.py", line 45, in render_with_context
return template.render(**kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/jinja2/environment.py", line 1295, in render
self.environment.handle_exception()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/jinja2/environment.py", line 942, in handle_exception
raise rewrite_traceback_stack(source=source)
File "<template>", line 1, in top-level template code
TypeError: 'NoneType' object is not iterable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template/__init__.py", line 579, in async_render_to_info
render_info._result = self.async_render( # noqa: SLF001
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
variables, strict=strict, log_fn=log_fn, **kwargs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/template/__init__.py", line 463, in async_render
raise TemplateError(err) from err
homeassistant.exceptions.TemplateError:
TypeError: 'NoneType' object is not iterable
That’s a bug in your template, not a bug in the markdown card.
The error stems from state_attr('sensor.kleenex_pollen_radar_kish_home_weeds','details') returning None.
Alter your template to only iterate the details when they exist.
The exception posted above from @lordwizzard is 100% he’s trying to iterate None in the template.
Your watchman template actually guarded against the error @lordwizzard posted:
{% set items = state_attr('sensor.watchman_missing_entities','entities') | default([], true) %}
Notice how his template doesn’t do that?
{% set pollen = state_attr('sensor.kleenex_pollen_radar_kish_home_weeds','details') %}{% for weed in pollen %}
I’m 100% positive that’s where his exception is coming from and no amount of markdown card updates will fix it.
entities in general started outputting None from attributes a number of versions back, so this exception has likely been happening a long time. It doesn’t affect the template when HA is running, only during startup when the attribute is None.
@petro I have opened a issue with the Kleenex Integration which is the location where that template is.
Thank you much and Happy Holidays to you!
@petro putting the test in fixed the error. No longer shows up in the log upon restarts
{% set pollen = state_attr(‘sensor.kleenex_pollen_radar_kish_home_weeds’,‘details’) | default(, true)%}{% for weed in pollen %}
Replicated for the others grasses, trees
The tables are aligned again, but the border still appears, even when set to “0”.
As for the images, they no longer respect the size settings that worked before.
Has anyone found the card mod selector sequence to remove these newly added borders and padding? Just been battling with it and getting nowhere - and I’ve tried the selectors above and in some other threads.
Couldn’t get this to work:
type: markdown
card_mod:
style:
ha-markdown $:
ha-markdown-element: |
td {
border: none;
padding: 0px;
}
This shouldn’t need to be done by creating a theme just for this tweak.
Using <table><tr><td>blah inside a markdown card has been a really good way of laying out complex displays on a dashboard card - now it just looks like a spreadsheet.
Bit lost as to why anyone thought this would be a good idea to change it but ho hum…
There has been issues raised on github about this. They will get it fixed.
With your selectors your specificity matches inbuilt so you need !important on both.
card_mod:
style:
ha-markdown $:
ha-markdown-element: |
td {
border: none !important;
padding: 0px !important;
}
You don’t need for card_mod to be applied at ha-markdown-element, so if you apply same style without that yaml selector the style will be higher in light dom and you won’t need !important as, although specificity still the same, the hops to the scope root of a higher style is less, so that style wins.
card_mod:
style:
ha-markdown $: |
td {
border: none;
padding: 0px;
}
Brilliant - a) thanks for the prompt post and b) thanks for explaining it! works perfectly - the !important was exactly what I was missing.
cant say I see any difference happening there unfortunately. I use it with this
- type: markdown
card_mod:
style:
.: |
ha-card {
overflow-y: scroll;
max-height: 700px;
}
ha-markdown $: |
td {
padding: 0px;
}
and have set the border to 0 in my themes.
Padding is untouched so far. So I do need the padding: 0px !important; even when using that selector.
its ugly though, so I guess Ill revert to the mod without that. Also note the headers require the same mod probably, as without anything else, they are out of sync with the columns below
I notice you often need !important when I don’t so Safari may differ in how it deals with selectors with same specificity.
yeah, whenever adding a new modification, I start out with the !important, to be sure I target the correct selector. If it works, I test it without.
It’s also the other way around at times, so one never can be sure I guess.
However, in this case it is the same for Chrome, also needs the !important
@dcapslock, do you know, by chance, if there is any code owner for markdown card? Asking, because over 6 months ago I raised some issues and corresponding PR for this card in GitHub and so far I did not received single response. Wondering if this is sort of dead end, eventually affected by some changes in core, like this case.
Is this the issue? Markdown card strips out from html code a ping attribute added to link · Issue #25329 · home-assistant/frontend · GitHub
Yes, this is the one… and corresponding PR: Make markdown card interactive (add html ping attribute working) · home-assistant · Discussion #47





