Wildcards in Config Includes

Hi All

Relatively new to HA having converted from SmartThings over the xmas break and I love it. I come here in search of help because very quickly my config has become quite big and getting a little difficult to manage. I have split the config up already and have a subfolder for switches, lights, sensors, binary_sensors etc and then a file in each folder for each device. The problem I have is if I, for example, re-purpose a sensor and move it to a different room I then need to remember that that sensors has a binary_sensor element, and a sensor element, or that sonoff has a switch, a binary_sensor and a sensor and then go on the search for all the files that relate to that device.

So I’m wondering if its possible (I have done quite a bit of searching but can’t see anything, but wondering if its an undocumented feature, or if not maybe it should be?) to use wildcards in config includes? For example:
sensor: #include_dir_merge_list "devices/*/sensor.yaml"

This would allow one subfolder in the “devices/” directory per device and within that folder a yaml file for the devices sensor entities, another yaml file for the switches and another for the binary_sensors etc. Keeping all the config for that one device in the one place. Could even include the customise info in there too. It would make my config so much easier to manage, I know that much for sure.

Any thoughts?

Nick

1 Like