I have a number of electric power meter devices. And I have a dashboard with a page view for each of them. Until now I manually changed the title of these views to whatever these devices were monitoring at the time. That varies.
I wonder if it is possible to use the contents of an input_text helper to assign to these titles.
In this case I would want to make to title dependent on the value of an input_text helper.
Some formula with brackets, quotes and states, I guess? Possible?
I already have custom:config-template-card installed, by the way.
Update:
When I try
title: {{ states( 'input_text.labelshelly1' ) }}
That is then automatically changed after saving to
But unfortunatly this didn’t work. The view is not visible after the change. I get ‘Unnamed view’ as title with an empty view.
I’ll keep trying variations on this. If I can’t figure it out I guess I’ll go ask at the authors webpage.
At least it now recognizes the variable.
But I think the problem is that config-template-card wants to see a card (or a row?) and a view is not a card.
Do not think you may place your whole view inside CTC (config-template-card).
It works for cards only.
If you need to modify a view title dynamically - card-mod-theme is your Way.
I have now installed that mod. But I don’t see yet how to use it to change the view title. The examples I’ve seen were all about style.
Could you please explain?
Let’s precisely define what you need.
Correct me if I am wrong.
You need to dynamically define a View’s name - like this one:
“Dynamically” = by using templates (like jinjia) & state objects (like “states()”, “state_attr()” etc).
“Define” = “change font-size, color, the text itself”.
Right?
If so - go to Community → Themes → Supercharge you themes (smth like that), in short - to card-mod theme thread.
Then ping me there - I’ll give you a solution.