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:
using:
- type: custom:useful-markdown-card
content: >
[[ states.sensor.log_tail.state ]]
gives:
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:
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Ă :
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
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.