From splitting up the configuration:
!include_dir_merge_list
will return the content of a directory as a list by merging all files (which should contain a list) into 1 big list
So this:
mqtt: !include_dir_merge_list mqtt/
will fail for multiple reasons:
- The example shown of a file in this folder is not a list. So
!include_dir_merge_list
will fail on it. !include_dir_merge_list
makes a list. Butmqtt
wants a dictionary. So even if you make every file in the mqtt folder a list its still going to be invalid.
Has nothing to do with tabbing in the file.
@raymonvdm your latest looks good. Although just an FYI, discussions on the release thread for 2022.6 made me (and many others) aware of the huge performance cost of using YAML-defined MQTT entities over ones created by MQTT discovery during restart. See here for the post where Taras helped a user reduce their startup time by a full minute simply by switching defining MQTT entities in YAML to using a script to create MQTT discovery messages.
If you are splitting up your MQTT config this much I figured you probably have a lot of MQTT entities and so this might be something you’re interested in.