Split configuarion

I am splitting up my configuration like a lot of others, and I am facing an issue I don’t understand. Maybe someone can help.

In my configuration.yaml I have:

homeassistant:
   customize: !include customize.yaml
   packages: !include_dir_named integrations

utility_meter: !include_dir_merge_named utility_meters

In the map utility_meters, a couple of yaml file with utility meters like:

Gas.yaml has:

gas_base: &gas_meter_base
   source: sensor.p1_meter_5c2faf009f88_total_gas

dag_gas:
   <<: *gas_meter_base
   name: Gasverbruik vandaag
   unique_id: gasverbruik-vandaag
   cycle: daily

And this is working fine.

But when want to relocate the line
utility_meter: !include_dir_merge_named utility_meters
(now a line in configuration.yaml) to the map integrations (see above) in :

utility_meter.yaml (this yaml file has this contenst);
utility_meter: !include_dir_merge_named utility_meters

Then I lose my entities…

Can anybody pls explain why?

Of course i have remarked the line out in configuration.yaml

Thx
B.

It looks like an issue with the paths and the includes, so we need know the path of all your files that are mentioned in an include line.

Paths:
configuration.yaml in root:
config/configuration.yaml

Others:
config/utility_meters

config/utility_meters/gas.yaml

config/intergrations/

config/intergrations/utility_meter.yaml

It was to quick away…

Root:
config/utility_meters
config/utility_meters/gas.yaml

config/integrations
config/integrations/utility_meter.yaml

I can’t remember how HA treats paths, but if it is relative, then the utility_meter.yaml will try to include a directory named utility_meters placed in the same directory as utility_meter.yaml.

I’m so ashamed. I had a blind spot that I didn’t see that. Thanks!

B