just to be precise, since it isn’t a template, and release notes announce support for HTML in
name or
name_template` , should this work:
name: Corridor + "<br>" + terrace
and, when using a template:
name_template: >
return entity.state.substr(0, entity.state.length-11) +
"<br>" + entity.last_changed
?
edit
think I found it, name doesn’t need template formatting, simply the <br>
:
name: Corridor <br> terrace
nice! thanks.
since no state_template is allowed, I have to use this for the name on my overview button:
name_template: >
return 'Last motion' + "<br>" + entity.state.substr(0, entity.state.length-11)
it takes the first part of the variable discussed before, and shows that in the name field, now with a line brake to mimic the state on the button:
.
which is fine. For this sensor. When the longer named ones will trigger the Last motion, they will get eclipsed again…
Wouldn’t there be a general CSS code to auto word wrap longer names/labels etc?
Also, since this is now part of the name field, it inherits the name format. In my particular button, trying to mimic the state, that has a different format, (smaller font, grey versus black font-color). Could I set that using html coding maybe?