Markdown Card


Markdown card is used to render markdown.

Screenshot of the markdown card Screenshot of the markdown card.

Configuration Variables

type

(string)(Required)

markdown

content

(string)(Required)

Content to render as markdown. May contain templates.

title

(string)(Optional)

The card title.

Default value:

none

card_size

(integer)(Optional)

The algorithm for placing cards aesthetically in lovelace may have problems with the markdown card if it contains templates. You can use this value to help it estimate the height of the card in units of 50 pixels (approximately 3 lines of text in default size). (e.g., 4)

Default value:

none

entity_id

(string | list)(Optional)

A list of entity IDs so a template in content: only reacts to the state changes of these entities. This can be used if the automatic analysis fails to find all relevant entities.

Default value:

none

Example

type: markdown
content: >
  ## Lovelace

  Starting with Home Assistant 0.72, we're experimenting with a new way of defining your interface. We're calling it the **Lovelace UI**.

Template variables

A special template variable - config is set up for the content of the card. It contains the configuration of the card.

E.g.

type: entity-filter
entities:
  - light.bed_light
  - light.ceiling_lights
  - light.kitchen_lights
card:
  type: markdown
  content: |
    The lights that are on are:
    {% for l in config.entities %}
      - {{ l.entity }}
    {%- endfor %}

    And the door is {% if is_state('binary_sensor.door', 'on' %} open {% else %} closed {% endif %}.