Closed dodekaphilist closed 2 years ago
added in 3.7
@htmltiger Wouldn't it be better to have Jinja2 templates like everywhere else in HA where much more things are possible in comparison with this form of implementation? Essential stuff like conditions, calculations and filters is currently missing...
And how do we implement it?
I'm no developer, but when looking at the code of other custom cards that support templates like this one, it should be rather easy with the help of card-tools. Checkout the documentation and maybe also have a look at other popular custom cards 🙂
I have looked both before and it has its own problems with the updates that requires to be fetched on every request, also all users need to be admin, depends on card-tools.
This is a javascript card that renders in the browser and templates are processed in HA so I would rather keep a simple lightweight and more compatible.
For the filters/conditions a template sensor can be created and the status displayed in the secondary info.
What about this card. As far as I can see, it doesn't use card-tools nor any other dependency..?
Seems like a good candidate, will look into it. Thanks.
I'd like to show some variable information in the secondary_info, which is currently not possible due to the static text. It would be really nice, if the card could support templates. Thanks! 🙂