config-template-card icon indicating copy to clipboard operation
config-template-card copied to clipboard

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

Open majkers opened this issue 3 years ago • 1 comments

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.

majkers avatar Nov 11 '21 10:11 majkers

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 avatar Dec 11 '21 03:12 ildar170975

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.

ildar170975 avatar Jan 16 '24 03:01 ildar170975