Closed
Description
label
supports multiline texts: https://docs.lvgl.io/8.3/widgets/core/label.html#newline
\n
should start a new line. Currently:
- label:
align: center
id: lbl_id
y: 30
recolor: true
text: 'Write a #ff0000 red# word\nand a #0000ff blue# one'
produces:
looks like \n
is interpreted textually, not being escaped.
Other escape sequences like \u
, \U
should be supported on long term...
Also LVGL supports formatting with printf
which is also ESPHome-friendly: https://docs.lvgl.io/8.3/widgets/core/label.html#set-text this could be usable when updating labels from lambdas.
Maybe some configurable options would be needed? Like escape_chars: true
and use_printf: true
?
Metadata
Metadata
Assignees
Labels
No labels