iantrich / config-template-card

📝 Templatable Lovelace Configurations
MIT License
434 stars 56 forks source link

Is it possible to add the name of the currently selected theme? #88

Closed majkers closed 7 months ago

majkers commented 2 years ago

Hello, is it possible to add the name of the currently selected theme? I would like to change background image depending on it. And my next question is that why I get warning when templating picture-elements card itself? I know that recommended way is to use it as one of the elements but, like I said before, I need to change image of picture-elements card.

ildar170975 commented 2 years ago

And my next question is that why I get warning when templating picture-elements card itself?

Do not put absolutely different issues in one issue. It is better to create a dedicated issue "Using config-template-card" for picture-elements causes warnings" (and I fully agree that this will be great)

ildar170975 commented 7 months ago

There are 3 different questions here. As I said - for each question a separate issue should be created. So far there is no feedback from OP.

add the name of the currently selected theme?

A name of the currently selected theme is not possible to acquire. Correct me anyone if you know a way.

I would like to change background image depending on it

  1. It is possible by card-mod which supports jinja.
  2. It is possible by using config-template-card (although using CTC for the whole picture-elements is not recommended; CTC should be used to style a single element).

Possible solutions posted in HA Community.