If I try to place markdown into either one it complains that mapping values are not allowed here
- type: vertical-stack
title: Irrigation
cards:
- type: markdown
content: |
{% for entity_id in states.group.sprinkler_all_zones.attributes.entity_id -%}
{% set domain, device = entity_id.split('.') -%}
{% set entity = states[domain][device] %}
{% if entity.state == "on" %}
{% set entity = entity.entity_id %}
Currently Running Zone: {{ entity[21:] }}
{% endif %}
{% endfor %}
Markus99
(Mark)
October 26, 2020, 10:31pm
2
This do what you’re after?
tom_l
October 26, 2020, 10:47pm
3
Your indentation is way off.
That is just how it posted for some reason . I understand indention and have it correct in my yaml. Have you actually attempted markdown inside of either one? Just asking.
I got it to work in a vertical stack but I guess you cannot leverage “markdown” inside of an entities card.
tom_l
October 27, 2020, 4:27am
6
If you don’t take the time to post exactly what you have it is very difficult to help you.
You can but you need this:
Funny thing about lovelace - cards, rows in the entities card, badges and elements in the picture-elements card work exactly the same behind the scenes.
That means that you can use them interchangeably if you know how, and e.g. put a button right in an entities card, a badge somewhere in the middle of your view or a markdown card (with background and border removed) right in your carefully crafted picture-elements card. Pretty neat stuff that allows for some fantastic creations.
However. Becau…
Thanks. I did not notice it posted formatting incorrectly until you said something. Typically it copies over fine. Just have to make sure I use preview.