question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Markdown + Card mod, very slow/buggy

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:22 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
xvlwcommented, Jun 7, 2022

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

1reaction
ildar170975commented, Jun 7, 2022

@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
Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom font styling is not applied to markdown card · Issue #52
What I am doing: applying custom styling to a markdown-card. What I expected to happen: font styling is applied to element h1.
Read more >
Card-mod - Add css styles to any lovelace card
I'm trying to make the outer border of a badge larger. I've managed to pin down in the inspector where the value is...
Read more >
card-mod v3.0 is not working for me : r/homeassistant - Reddit
The following is not working for me: type: markdown content: '## Hello' card_mod: style: | ha-card { background: transparent; text-align: ...
Read more >
Modern IDEs are magic. Why are so many coders still using ...
While a coder could sit down at any terminal and begin working in Vim, that isn't true for any IDE. Further, IDEs are...
Read more >
Twitter — brandur.org - Brandur Leach
Pay a runway into an account and it'll run without having to swap out a credit card every few years. Keep to core...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found