Customization Problem

I am trying to add customizations for some manually configured mqtt motion sensors. I have my config split up into directories to keep things easy to read. I keep getting the error “expected a dictionary for dictionary value @ data[‘customize’]”.

I have seen a few other threads with similar issues, but none of them are splitting their config up, and I can’t seem to get any of the fixes from those threads to work.

My configuration.yaml looks like this:

homeassistant:
  customize: !include_dir_merge_list customizations

And I have a directory named “customizations” with a file inside it named “entry_motion.yaml” that looks like this:

  - binary_sensor.entry_motion:
    device_class: motion

I’ve tried all kinds of different indentation, adding quotes around the “binary_sensor.entry_motion” section etc and can not seem to figure this out. Any help would be greatly appreciated.

Customize should be formatted like this:

binary_sensor.entry_motion:
  device_class: motion

binary_sensor.hall_motion:
  device_class: motion

binary_sensor.kitchen_motion:
  device_class: motion

Note the lack of dashes.

For which I think you have to use !include_dir_merge_named

See the example here: https://www.home-assistant.io/docs/configuration/splitting_configuration/#example-include_dir_merge_named

This did it, thanks so much!

1 Like

Did you still use merge list or named?

I really should break up my massive files at some stage and would like to know if my understanding is correct.

I used dir_merge_named

  customize: !include_dir_merge_named customizations

There’s a great video with DrZzs and Franck were Franck explains it all pretty well, its what motivated me/showed me how to do it. https://www.youtube.com/watch?v=Wge9FDHoZDs&t=535s

1 Like