i want to have something like read only text box placed in the UI and to be able to set it to values according to different events. what is the best approach for this?
this is lovelace card - how do you set its content from a script/automation?
There is an example on the github page.
You might be able to use markdown mods templates and conditionals to vary the text as you need.
Otherwise get it to display the state of an input_text and vary that content with automations or node red or whatever you want to use.
actually, as funny as it sounds - input_text was the thing i was looking for and didn’t know about - thanks
So I was looking to do something similar and this solution is a bit short on details. But in any case, the markdown card specifically states it allows templating so something like this:
- type: markdown
title: Forecast
content: >-
{{ states.input_text.nws_forecast_current.state }}
Obviously the input_text entity holds the text to be displayed in the card.
Sorry for bumping an old thread but none that pop up near the top of a search offer a clear solution.
It does - now. It didn’t support templates when this (very old) thread was current.