To show more than one line of text you can try this:
{{ ( states.sensor.dark_sky_hourly_summary.state | wordwrap(50, true,“§”)).split(“§”)[0]}}
Using [0] for the template for the first line of text, [1] for the second line, [2] for the third.
The convoluted logic is:
- wordwrap places a § between words in blocks less than 50 chars (you can use any character that hopefully will never be in the original text)
- split transform the string in an array of strings splitting on the § char
- [n] takes the nth element of the array.
This is the code I used to test it in the developer tools:
{{ (“Very long text used to try the word wrap feature in Jinja template system that should translate in three rows of text” | wordwrap(50, true,“§”)).split(“§”)[0]}}
{{ (“Very long text used to try the word wrap feature in Jinja template system that should translate in three rows of text” | wordwrap(50, true,“§”)).split(“§”)[1]}}
{{ (“Very long text used to try the word wrap feature in Jinja template system that should translate in three rows of text” | wordwrap(50, true,“§”)).split(“§”)[2]}}