Automations.yaml file not loading

Hi,

I have a problem with my YAML config but i can’t seem to find it. The automations.yaml file automations are not loading. My config

configuration.yaml:


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor: !include sensors.yaml

# Text to speech
tts:
  - platform: google_translate

google_assistant:
 project_id: homeassistant-1ff99
 service_account: !include SERVICE_ACCOUNT.json
 report_state: true

 
http:
 use_x_forwarded_for: true
 trusted_proxies:
 - 127.0.0.1
 - 172.16.0.0/12
 - 10.0.0.30
 - ::1
 
discovery:
 ignore:
 - philips_hue

tts:
  - platform: google_translate
 
influxdb:
  host: localhost
  port: 8086
  database: homeassistant
  username: homeassistant
  password: homeassistant
  max_retries: 3
  default_measurement: state
  
automation:   
  - alias: "Speel TTS van incident af"
    trigger:
      platform: state
      entity_id: sensor.incidents
      attribute: message_to_speech_url
    condition:
      - condition: not
        conditions:
          - condition: state
            entity_id: sensor.incidents
            attribute: message_to_speech_url
            state: None
    action:
      - service: media_player.play_media
        data_template:
          entity_id: media_player.alle_speakers
          media_content_id: >
              {{ state_attr('sensor.incidents','message_to_speech_url') }}
          media_content_type: "audio/mp4"
          
      - service: notify.mobile_app_iphone_jeroen
        data_template:
          message: "Brandweerinzet {{ states('sensor.incidents') }}"
          
      - service: notify.mobile_app_iphone
        data:
          message: "Brandweerinzet {{ states('sensor.incidents') }}"

automations.yaml

- id: '1623837945112'
  alias: Verlichting aan bij niet thuis test
  description: ''
  trigger:
  - platform: device
    device_id: d7702d48ff07662af2dfbda2672c0227
    domain: device_tracker
    entity_id: device_tracker.iphone_jeroen
    type: leaves
    zone: zone.home
  condition:
  - condition: sun
    after: sunrise
  action:
  - type: turn_on
    device_id: a4afb358fd3c282b195c8bee322a75e0
    entity_id: light.buitenlamp
    domain: light
    brightness_pct: 2
  mode: single

When i remove the automation part in de configuration.yaml the automation.yaml is working. If i put the automation part of the configuration.yaml in the automation.yaml nothing is working.

Wonder what’s the best thing to do

You don’t have errors in the log?
I’m pretty sure you can’t have automation: twice.

You have to add a label. See

Yes, that was the solution. Stupid i havent seen it.
Thank you!