Replies: 6 comments 3 replies
|
you can check my gists where I have a themes.yaml file and a uix-themes.yaml file |
|
Hi Marius, thanks a lot for your template files, but I don't see the point. Are macros the thing I need to reuse my common and colors parts everywhere? |
|
Thanks Marius! I think I understand the first option (using a helper), but I'm very interested in the second one. Could you show a minimal YAML example of what you mean by: "define the anchors differently, with a <<: &generic_colors and inject with <<: *generic_colors" I'm currently doing: but _common_colors appears as a selectable theme. I'd love to see the structure you're referring to, because I can't quite picture where the &generic_colors anchor is defined without becoming a top-level theme. |
|
btw, this yaml in themes has nothing to do with UIX.. |
|
Allright, I think I understand the point. Thanks a lot for clarifying and have a nice weekend! |
|
Hi Marius, thanks a lot for sharing this simple trick for me. It really works and I'm able to make a complete list of all anchors like this: |


Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
I'm currently migrating my custom theme from card-mod to UIX and I'm using YAML anchors to avoid duplicating common configuration.
Unfortunately, Home Assistant shows _common_colors, _common_uixs, etc. as selectable themes in the theme picker.
I know this is caused by Home Assistant treating every top-level YAML key as a theme, but I was wondering:
Is there a recommended UIX pattern to keep reusable YAML anchors/helper blocks without them appearing in the theme selector?
Or is the recommended approach simply to duplicate the shared configuration and avoid anchors completely?
How are other UIX theme authors solving this?
Thanks!
All reactions