it was merely a suggestion to make the tool itself even more versatile. I didnt mean to suggest you to use that in a card at all.
Always best to keep to the cards own styling options, so I agree completely.
do you know who made this? tried to go to the root page, but no link at all anywhere
btw, I just had an experiment and saved the segments in my secrets.yaml and import that via:
In that case, in yaml mode a “normal” include file would make more sense to me then making the colors secret.
Not as easy as the tool in the screenshot above, but if you need color codes for a gradient tools like these can help. You’ll get the hex codes at the bottom of the page.
we all know the secrets.yaml file is not truly secret, and merely there to be able to easily share our configs without sharing that sensitive information in the rest of the config.
we use the secrets file for a lot of other things, like complete rest/comand_line commands, or html embeds
or, as in this case, as a placeholder for strings me use throughout the config.
Also, as far as I recall, secrets.yaml has the advantage we can use in front-end And back-end, where !includes are to be used in Frontend only.
the biggest disadvantage in my opinion as we already described, is the fact !secrets nor !includes can be used in the UI…
anyways, you summed it up quit nicely, each should use the technique they can use best.
You use we a lot in your post, but who is we? Not me.
I use secrets.yaml for, well, you know, what the name implies. What is in there is also in my password locker. I do version control on the Home Assistant configuration on github, and secrets.yaml is not there. So part of the relevant configuration is not in version control if you put it in secrets.yaml. And I’m not going to put color gradients in my password vault.
Generally I think it is bad practice to reuse something that is meant for something else just because it is convenient. It is bad for maintainability. People should know what is in a file (and what isn’t) by looking at the name.
I ended up to move almost all shared code from “secrets” to “include” (btw, nobody advised me to use “secrets” for reused code - and never read about this practice here before myself).
What is only left in “secrets” are one-string definitions like: