Can you directly display a template expression as a UI 'entity' or do you have to create a helper?

I’d like to display, in one of my UI panels, a value that is derived by a simple calculation based on two sensors. I don’t need to use this value anywhere else. I could create a template helper but I was just wondering if there is a way to specify the expression directly in the UI element config somehow?

not all (in fact most) cards do not accept and display templates, however the mushroom-title-card does.

take a look at that and see if that gives you what you want.

2 Likes

Markdowncard would be an alternative as well.

Or if you use button-card and/or mushroom-cards (not only the title one @armedad mentioned), you can define all fields via templating.

Something like this button:

custom_fields_2

2 Likes

Just create a template sensor and put that value in any card you like.