And that all works fine. But suppose I also want to exclude something additional in one only, e.g. maybe a “domain: light”. I can’t seem to find a place to put it, e.g.
All variations of these complain about bad indentation. I’ve tried repositioning the include on the next line, changing indentation in the file, no luck so far.
Is there some way I can see the actual resulting yaml after doing the include, so I can judge what’s wrong with it?
You cannot merge two “include” lists. Wait, let’s test that " !include_dir_merge_list" option.
No, false alarm.
So, again - You cannot merge two “include” lists ))
It seems to be possible to use !include_dir_merge_list, but it will be a bit confusing.
include_dir_merge_list does include all files in the directory, but also files subdirectories and you can also insert yaml files in that directory and those subdirectories that include other files outside the directory.
Am confused by the second last and last. I’m not trying to merge two include lists, at least I do not think so. I’m trying to combine an include list with manually entered items. It doesn’t seem happy with the indentation of the manual items.
I’m basically just trying to replace a piece of code used repetitively, notably so I can change it in one place rather than 50 places if I add another exclude to it.
I apologize if I’m misinterpreting the answers in that regard, but I can’t connect the idea of a merge list (with there’s only one include).
Do you mean that I’m using the include in multiple places? It seems perfectly happy with that, I used it in more than one place in the same file, and didn’t hit a problem until I needed to supplement it with some additional items.
The problem is that once you include a list (without the - in front), then you can not add items (with the - in front) any longer.
The trick with include_dir_merge_list is that it can combine the files in a directory and those files can contain an include list each.
I’m still curious though – is there a way, much like a pragma on the C compiler expanding includes and macros… that you can see how an include gets built? What the effect of it is, including spacing, etc?
is wrong.
You can change it to “include” & see yourself.
And you was too quick with a “solution mark” since your question has no solution. I repeat - you cannot merge lists.
What you are trying to achieve MAY BE (need to test) possible with a “template” filter & decluttering card.
Assume your auto-entities list has some default “exclude” list - then with an input variable you may define an additional exclude.
Could be complex & cumbersome - but a good educational example.
This is very strange. You are correct – it doesn’t work. It does pass syntax, but it does not exclude all the things in the list.
What I cannot understand is it excludes SOME of the things in the list.
You show an example of “the resulted file is”… do you just know it does that? Or is there a way to see that result? The blind attempts are what is giving me fits.
But you are correct, it is not giving the right answer, even though it is no longer giving syntax errors.