I start playing with the “picture-elements”.
I would like to change dynamically the background-color when the “humidity” of one sensor is above 50% (visual feedback, kind of alerting).
I am back to even a more basic question: is templating supported in this card ?
As an example below, I simply try to have the “Title” being displayed dynamically without success
But when reopening the editor (in lovelace), the row
{{ states(‘counter.presence_hall’)}}
has been replaced by ’[object Object]’: null
Any idea or alternive for my main objective (change background-color when sensor above a given numeric value) ?
It would take a custom card to be able to render a jinja template. It would have to make a service call into home assistant with the template and get a response, then render the response in javascript. Such cards do exist…but these aren’t it.
Just create a template sensor and use that template sensor as the card background. Have the template sensor output whatever static states you want. Then use these as the states filter.
when I search this page, no template is found so I presume the answer is No.
there are many custom cards available, have a look here or here
there are cards that support JS templates - button-card, for example
from what I gathered recently, because of that Jinja card rendering I wouldn’t recommend custom cards with Jinja templates, especially if you have a lot of them as it will slow down your viewing device.