Splitting Automation help needed

I’m trying to split may automations in to single files, but I keep getting this error:

Logger: homeassistant.config
Source: config.py:416
First occurred: 11:00:43 AM (13 occurrences)
Last logged: 11:00:44 AM

Invalid config for [automation]: expected dictionary. Got OrderedDict([('default_config', {}), ('frontend', OrderedDict([('themes', OrderedDict([('Google - Light', OrderedDict([('primary-font-family', "'Open Sans','Rubik',Roboto,sans-serif"), ('paper-font-common-base_-_font-family', 'var(--primary-font-family)'), ('paper-font-common-code_-_font-family', 'var(--primary-font-family)'), ('paper-font-body_-_font-family', 'var(--primary-font-family)'), ('paper-font-subhead_-_font-family', 'var(--primary-font-family)'), ('paper-font-headline_-_font-family.... (See ?, line ?).
Invalid config for [automation]: expected str for dictionary value @ data['to']. Got None. (See ?, line ?).
Invalid config for [automation]: required key not provided @ data['action']. Got None required key not provided @ data['trigger']. Got None. (See ?, line ?).

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
frontend:
  themes: !include_dir_merge_named themes/
        
homeassistant:
  allowlist_external_dirs:
    - /config/
    - /media/
  customize: !include customize.yaml
  packages: !include_dir_named packages
  
conversation:
breaking_changes:
api:
sun:
cloud:
discovery:
  ignore:
  
browser_mod:
  prefix: 'browser_mod_'

magic_areas:

##### INCLUDES #####
group: !include groups.yaml
automation: !include automations.yaml
automation split:  !include_dir_list automation
script: !include scripts.yaml
scene: !include scenes.yaml
zone: !include zone.yaml
light: !include lights.yaml
binary_sensor: !include binary_sensors.yaml
sensor: !include sensors.yaml
fan: !include fans.yaml
camera: !include cameras.yaml
# stream: !include streams.yaml  
input_boolean: !include input_booleans.yaml  
input_select: !include input_selects.yaml
input_datetime: !include input_datetimes.yaml
# climate: !include climate.yaml

Also, what is the correct format for spit up automatons?

id: awake
alias: Awake
description: 'Turn off switches'
trigger:
action:
- type: turn_off
  device_id: f9f6262410c411ebbd84b1a40111513b
  entity_id: switch.heavy_duty
  domain: switch
- data: {}
  entity_id: input_boolean.inbed
  service: input_boolean.turn_off
- data: {}
  entity_id: input_boolean.sleeping
  service: input_boolean.turn_off
- service: automation.turn_on
  data: {}
  entity_id: automation.bedroom_lights_on_with_door_open
- service: automation.trigger
  data: {}
  entity_id: automation.morning_wakeup
mode: single

Is this correct?
Thank you

Change this:

automation split: !include_dir_list automation

to this:

automation split: !include_dir_merge_list automation

That’s what I use and it allows me to store multiple files (each containing one or more automations) in the automation sub-directory.

3 Likes

Thanks, that got rid of the error, but now my automations don’t work…ugh

After restarting, are your automations listed in Configuration > Automations?

Yes, they are all turned off and uneditable (expected that). When I trigger an automation from a input boolean it doesn’t trigger.

Turn them on :wink:

I can’t , they are greyed out

Que?

Services > automation.turn_on > entity_id: all

Nope, none turned on.
Edit:
It’s the formatting of my automations. I got one to show up, but there is an uneditable one listed also. (I think

1 Like

Thank you @123 I’ve finally split my 4000 lines automation file in something more easy to handle. Your answer should be tagged as the solution!

2 Likes