lovelace-card-mod: Markdown + Card mod, very slow/buggy

My Home Assistant version: 2022.6 (also noted with 2022.4.3)

My lovelace configuration method (GUI or yaml): yaml

What I am doing: combining sensor data via markdown and layout via cardmod

What I expected to happen: opening the dashboard view should format along css in <1 sec

What happened instead: format > 10 sec or sometimes never Observations,

  • when clicking ‘edit’ for the view, it responds immediately
  • cardmod v 3.1.4/5 slow, 3.1.1 is OK

Minimal steps to reproduce:

# The least amount of code possible to reproduce my error

# End of code

Error messages from the browser console:


By putting an X in the boxes ([]) below, I indicate that I:

  • Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).

  • [] Have made sure I am using the latest version of the plugin.

  • Have followed the troubleshooting steps of the “Common Problems” section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.

  • Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 22 (8 by maintainers)

Most upvoted comments

*I inserted your code into a card and it worked. My issue was likely formatting.

@xvlw Do not confirm, the style is applied immediately after opening a page. No flickering, no loosing the style. Checked with your “#” example + my “h1” example. image

type: vertical-stack
cards:
  - type: markdown
    content: '# {{ now().strftime(" %I:%M")}}'
    card_mod:
      style:
        ha-markdown $: &ref_style |
          h1 {
            color: red;
            text-align: center;
            font: Roboto;
            font-size: 2em;
            font-weight: 400;
          }
  - type: markdown
    content: <h1>{{ now().strftime(" %I:%M")}}</h1>
    card_mod:
      style:
        ha-markdown $: *ref_style