HI,
trying to migrate this regular HA card with sensor:
hassio_log_tail:
name: Logtail
icon: mdi:library-books
entities:
- sensor.log_tail
to Lovelace
- type: entities
title: Logtail
entities:
- sensor.log_tail
and/or
- type: custom:useful-markdown-card
content: >
[[ sensor.log_tail ]]
or:
- type: markdown
content: >
[[ sensor.log_tail ]]
the entities card shows correctly but the markdown card errors:
![07](//community-assets.home-assistant.io/original/3X/7/7/77c774ecc4890f491623116e3a300daa5d415a89.jpeg)
using:
- type: custom:useful-markdown-card
content: >
[[ states.sensor.log_tail.state ]]
gives:
![02](//community-assets.home-assistant.io/original/3X/f/f/ff0de340bf656ceab555b40133381ed5fd6a85ff.jpeg)
while dev-state is showing as it should:
what should I change to get this showing correctly?
this is the sensor definition:
# https://home-assistant.io/components/sensor.file/
- platform: file
file_path: /config/home-assistant.log
name: Log tail
petro
(Petro)
2
From the other thread about this, shouldn’t it be:
- type: custom:useful-markdown-card
content: >
[[ sensor.log_tail.state ]]
Notice the word state after your entity_id and the lack of the word states before.
Exact same issue you had here:
The key being
No, that’s what I tried of course, but it shows:
![58](//community-assets.home-assistant.io/original/3X/e/e/eefa1c7d17e516d9fbba620790531ef86f8eeeb9.jpeg)
should have mentioned that, sorry
petro
(Petro)
4
in the custom:useful-markdown-card? That doesn’t make sense.
it doesn’t, and it didn’t… I tried all combinations both with the custom card or the regular markdown. Except for this:
- type: custom:useful-markdown-card
title: Logtail
content: >
[[ sensor.log_tail.state ]]
et voilà:
![24](//community-assets.home-assistant.io/original/3X/b/e/be11a097a53d77ad6793f3224bf2b6c7556ba40c.jpeg)
thank you…
petro
(Petro)
6
weather coordinates? That’s odd… You may have found an issue with the custom card.
EDIT: Nevermind, you’re saying it works.
the card now shows my log. that works.
the OWM component doesn’t ![:wink: :wink:](https://community.home-assistant.io/images/emoji/twitter/wink.png?v=9)
nickma
(Nick)
9
Hi,
with the built in Markdown card the following worked for me:
type: markdown
content: |
{{ states('sensor.log_tail') }}
Ispired by this post.
2 Likes
petro
(Petro)
10
This whole thread was using the custom:markdown card prior to the existence of Jinja templates in the built in markdown card.
petro
(Petro)
12
That you revived an old outdated thread.
1 Like
petro
(Petro)
14
it is when the main topic at hand is about the useful-markdown-card which is deprecated
nickma
(Nick)
15
Which it wasnt (exclusively). Discussion Done.
petro
(Petro)
17
Deleting the post doesn’t mean I agree with you.