Integration not found error after splitting configuration.yaml

I’m rebuilding my configuration.yaml by splitting it up. I have tried to follow Splitting up the configuration - Home Assistant but I must not be understanding this fully.

When I check configuration.yaml before restarting Home Assistant I get the error

Integration error: c4_services - Integration 'c4_services' not found.

In my configuration.yaml I have an integration called c4_services. Before splitting it looks like this (excerpt):

# C4 amp integration; 30 May 2021

c4_services:

input_select:
  # Family Living audio sources
  family_living_c4_input:
    name: Audio Input
    options:
      - Squeezebox
      - Volumio
      - Fetch
      - Chromecast Audio
  family_living_amp_input:
    name: Zone Input
    options:
      - 1
      - 2
      - 3
      - 4

In the new configuration.yaml I have the following row
c4_services: !include setup/c4_services.yaml # Control4 integration; C4 amp as of Apr 2022

In the config folder setup I have the c4_services.yaml with the following content

# C4 amp integration; 30 May 2021

input_select:
  # Family Living audio sources
  family_living_c4_input:
    name: Audio Input
    options:
      - Squeezebox
      - Volumio
      - Fetch
      - Chromecast Audio
  family_living_amp_input:
    name: Zone Input
    options:
      - 1
      - 2
      - 3
      - 4

I also have the necessary files in config/custom_components. Why do I get this error?

because you are putting an input_select integration in the c4_services !include file. it can’t work like that.

from your original config it doesn’t look like c4_services has any config options. So I don’t see any purpose to splitting it out.

But since it is a top level integration if you really want to split it away from config.yaml then the only way to do that is by putting it into a package. then you can add the input_select there as well.

Thanks. Managed to get this working with packages. I like the simplicity and ability to group by functional areas

1 Like

Agreed. I have about half of my config in packages if it makes sense to split that way.

1 Like