Hi everyone, hopefully someone can help me out and shed some light as to why this isn’t working.
I’m just starting to dive into reusing code, so looking at using YAML anchors. I’m currently working on a group of input_select boxes that all share the same list of options, but there is where the wheels are falling off for me.
I’ve searched so much on this and exhausted everything I can find on this forum and have formatted the same as people who have this working, but for some reason I can’t get it to work…
I was wanting to have a bunch of selectors that all have the same options. Then I could choose the current theme, just like the normal way, and then 2 different selectors to pick daytime and nighttime themes, that an automation would then use, rather then having to edit the automation each time I want to use something different.
Since they would all share the same list of options, I thought I’d use a YAML anchor and have one list instead of 3. Make it easier to update when I add/remove themes.
If you use packages, anchors will only work in the current file that they are declared in. This is inside or outside home assistant. Just the nature of yaml.
well yah, because your input_selects were incorrectly configured. It’s an ordered dict, not a list of dicts. Check out the differences between my post and your last attempt.