Split Groups Into Multiple Files

I would like to split my groups in to multiple files, where each file represents a group but I can’t seem to find the right include command to make that work. Up until now I have been able to put all of my groups into a single file called groups.yaml using this:

group: !include groups.yaml

But now want to have them all read from a folder named Groups, where it will be something like this:

- Groups
  - living_room.yaml
  - bedroom.yaml
  ... etc

I’ve tried many variations of includes but can’t seem to get this working. This, for instance, does not work:

group split: !include_dir_merge_named Groups/

With a file there called “test.yaml”:

test:
  name: Test group
  entities:
    - switch.dummy_switch_1
    - switch.dummy_switch_2

But I don’t see any groups from this. This is on a fresh new install of HA on a virtual machine where I test things like this out before rolling out to production, so there isn’t any other method of resolving groups on that machine at the moment (in case you might be thinking there’s a conflict between the old method and the new method on a production setup).

I can use the above setup for Scripts just fine and each script in its own file loads up and works great.

Yup, that’s what I do:

group: !include_dir_named groups/

in there you’ll find files like car.yaml:

name: Car
entities:
- device_tracker.car_front
- device_tracker.car_rear

Ah, ok, so it’s the “split” that isn’t working for groups then, I took that out and it works fine now. Thanks @Tinkerer! I guess I’m not yet 100% clear on where “split” works and doesn’t.

It works just fine - the problem will have been your formatting.