#I have made But unfortunately it doesn t

1 messages · Page 1 of 1 (latest)

old yoke
#

It looks like the template requires an entity. Looking at the template, the first thing it tries to set it the label, based on the entity.

#

So, what I would suggest, is take the entire template code, copy and paste it into the card that you're working on (removing the templates: section). Then start ripping out anything that deals with entities.

#

So, change yaml - background-color: >- [[[ if (variables.ulm_custom_card_esh_room_light_entity) { var color = states[variables.ulm_custom_card_esh_room_light_entity].attributes.rgb_color; if (states[variables.ulm_custom_card_esh_room_light_entity].state == "on") { if (color && variables.ulm_card_dynamic_color) { return 'rgba(' + color + ', 0.2)'; } return 'rgba(var(--color-background-yellow), 0.2)'; } } return 'var(--ha-card-background, var(--card-background-color, white))'; ]]]to ```yaml

  • background-color: white```
clever lion
#

I have now deleted the custom_fields area. Now the card looks like this. But the icon is moved.

old yoke
#

I'm confused. That code doesn't match what you posted originally.

clever lion
old yoke
#

But, if you mess with the template, you mess with everything that is using that template and is showing correctly.

clever lion
#

I then used the new template in my dashboard as follows.

old yoke
#

That should make some progress but there's a bunch of stuff in the styles: section that needs to be modified. That all looks like it has some default settings that should be okay. (In fact, if the entities are null, it is set to not display the custom field(s).) The next thing I would take a look at is the label.