My python script creates this sensor.summary, and sensor.orphans_sensor, which have a text file as attribute indeed, and is customized via the custom-card and hence can be over 255 characters.
In regular HA this is then displayed in a card.
you think it might be [[states.sensor.orphans_sensor.attributes.text]] ?
check this:
the parser is complaining about the https links in the comments of the html file…who would have thought that
in the template editor, does {{ states.sensor.orphans_sensor.attributes }} have an entry for “text” ?
if so, the syntax in the useful-markdown-card content would be [[ sensor.orphans_sensor.attributes.text ]].
Regarding the parsing errors, are these coming from the state-card_value-only that you tried to reference in lovelace.yaml? i think that file will only work with the custom_ui and the original front-end.
you can keep the state-card_value-only, just don’t reference it in the lovelace.yaml… it’s in the wrong format and language for lovelace.
so, it seems you can replicate your original card content with the useful-markdown-card inside lovelace, just a little different syntax in the configuration.
leave the custom card attribute in the python script, that is for the legacy frontend… lovelace doesn’t card about that and will have no effect.
in the lovelace content line, remove “states”… it is not exposed that way in the useful-markdown-card. should be [[ sensor.orphans_sensor_lovelace.attributes.text ]] or [[ sensor.ophans_sensor.attributes.text ]] as you had originally.
Markdown is a simple way to format text that looks great on any device. It doesn’t do anything fancy like change the font size, color, or type — just the essentials, using keyboard symbols you already know. https://commonmark.org/help/
yes, that’s why I was hesitant to try that.
Remarkable though is that when clicking for more-info, all correct formatting is displayed, so I know the legacy custom card is working and recognized in Lovelace.
Only need to develop a way to show it in the frontend on first view…
maybe @thomasloven will be able to have a look at that anytime in the future…
convert the custom-card-value_only I posted to a Lovelace usable one, or, maybe easier, have Lovelace simply show it in the frontend (the way the more-info already does)
HI!
thanks for that suggestion, I’ll have a look if that would work. The thing is, Id just need a card to display what was being offered to it… By using html in the markdown card, id be editing already formatted text, which seems unnecessar.
As you can read above, the more-info does show correctly, so it should be possible?
It’s because you have states in your name: states.sensor.summary. In your case it should just read sensor.summary.state. State is required at the end to let the card know you want the state out of it, not another attribute.
For some reason, the dev decided to omit the states object from the calls. Personally, I think we should create an issue with the card and have him add it back. So far, it’s only led to confusion as it’s the only place in HA that omits the states object.
You’re assuming you know what sensor.summery is. Sensors don’t have a text attribute normally. That is what you are setting. Not everyone has your setup. We have to assume that he just has a normal summary sensor.
EDIT: Unless summery.py sets that. Then by all means, he’ll need the .attribute.text.