Hi,
I want to run an automation that feed a input_text helper with, well text but more precisely, markdown text.
I want to output this entity into a markdown card and I expect the markdown to be respected but that doesn’t work correctly. It looks like the markdown is sometimes ignored, sometimes interpreted… Am I doing this right ?
Service call:
service: input_text.set_value
data:
value: >-
Jour 5 <br /><br /> BlaBla:<br /> * Anglais - Période 5 <br /><br />
BlaBla:<br /> * Éduc - Période 4 <br> * Musique - Période 5 <br />
target:
entity_id: input_text.matiere_ecole
With this example, if I use the developer tool to call, I see no error, the service get called and seems to work, but it doesn’t update the entity at all…
Content of my markdown card:
# {{states('input_text.matiere_ecole')}}
It work with simple text or very simple markdown but there’s something weird. What am I missing ?
Thanks!
I know this is an old post, but I am having the exact same problem. Was there ever an answer?
Hi! Welcome to the forum!
It’s been a while since this post, I can’t remember what was the problem and I don’t see anything different in my post VS what I have now… But yes it is working as expected now, I just can’t tell you if it was an error on my side of if I did something specific to fix it, it’s running without issue… Here’s a part of my working automation:
I run an automation during the night that look into a calendar and feed the helper based on the calendar value.
- conditions:
- condition: state
entity_id: calendar.calendrier_scolaire
attribute: message
state: "Primaire : J1"
sequence:
- data:
value: >-
Jour 1 <br /><br /> ZZZZZZ:<br /> * Journée Normale 💩 <br /><br
/> YYYYYY:<br /> * Anglais - Période 2
target:
entity_id: input_text.matiere_ecole
action: input_text.set_value
Here’s the card I use to display in lovelace:
type: markdown
title: Prochaine journée
content: "{{states(‘input_text.matiere_ecole’)}} "
Thanks for the reply. After digging into this some more, I figured out that it was not a problem with the markdown itself, but that my markdown was growing to over 256 characters. An input text cannot contain more that 256 chars even if you set max length to a larger number. I had to split my markdown into chunks and put them together in the markdown card using a template.