I see… Of course, you may create a template sensor which repeats the original one. But may be using the "config-template-card"
is better - you decide!
I heard that using custom cards with templating based on JS, Ninjia2 needs more CPU usage, and this may be crucial on slow systems.
This is just an option.
I’m afraid that using "card-mod"
for some particular card one day may stop working - just because an internal structure of the card is changed. So I prefer to choose a “usual” way of doing something rather than those CSS tricks with "::after"
, "::before"
& "content"
.
Regarding “Cannot read property”.
Do you have the "decluttering-card"
& "card-mod"
installed?
Also, I see that the template & the card are in one “code page” - are they in one file?
In GUI mode (which is not yaml mode) the template must be before the “dashboard” section, and the code for a card must be inside some “view” section.