Hi!
One day i saw “button card template is missing” and noticed that code in lovelace dashboards for button_card_templates disappeared and YAML starts with
title: Home
views:
I had a backup, so I restored it, but it disappeared again and again after approx one hour. I can’t see anything in logs (I have an error log level). How can I define button_card_templates in Lovelace dashboards?
Look, just do what works for you, there’s no one size fits all way to tackle problems in the web world.
In your post above you had something which worked for you, just use that.
well, thats just it, I haven’t found a way to use opacity on a named variable, but I’ll take it elsewhere, thanks for the support and suggestions!
for reference: I also tried, as a final option, to have the main theme colors like primary-color: set with rgb values (mine were set in hex) so to follow your last suggestion to the letter. unfortunately that doesnt help either. so for now: I haven’t found a way to use a color variable name in the rgba() construct to have it use an opacity.
In your theme: my-color: 123, 123, 123. Note this is not a color, it’s just 3 numbers separated by a coma.
Use it like this: color: rgba(var(--my-color), 0.5)
In your theme: my-color: rgba(123, 123, 123, 0.5)
Use it like this: color: var(--my-color)
That’s the 2 options. It’s not possible to re-use an existing color css variable you’ll have to to duplicate it.
Are you using lovelace YAML mode? If not, you might be using some custom views which rewrites the dashboard. If so it seems to be an issue with that other custom resource.
Just testing the triggers_update but it’s not working for me. The card is only updated by the entity but not form the triggers_update entity. Is there anything i’m doing wrong?
triggers_update updates the card (which is useful if you have javascript templates) but the card doesn’t reflect the state of what is defined in triggers_update if that’s your intent.
Can I see a context?
Are you using a custom:button-card inside some Picture elements card?
If so, the conditional positioning should be done like it is described here: