Labeled automation block vs automations.yaml

I’ve been trying to add a custom automation to my automations.yaml however I’m running into some problems.

I currently have the following in my configurations.yaml and it’s working perfectly (note: the ID I’m using a string ID I found in the tuya app):

automation toggle_garage:
  - id: '3vd7ybbeh10llcdc' 
    alias: Toggle the garage door if IOS action fires
    description: ''
    trigger:
      - platform: event
        event_type: ios.action_fired
        event_data:
          actionName: "ToggleGarageDoor"
    action:
      - service: homeassistant.toggle
        entity_id: cover.garage_door_door
      - delay:
          hours: 0
          minutes: 0
          seconds: 25
          milliseconds: 0
    mode: queued

I have tried moving this over into the automations.yaml (the reason being that I like the idea of staying neat and organised):

  - id: '3vd7ybbeh10llcdc' 
    alias: Toggle the garage door if IOS action fires
    description: ''
    trigger:
      - platform: event
        event_type: ios.action_fired
        event_data:
          actionName: "ToggleGarageDoor"
    action:
      - service: homeassistant.toggle
        entity_id: cover.garage_door_door
      - delay:
          hours: 0
          minutes: 0
          seconds: 25
          milliseconds: 0
    mode: queued

however this does not work when it’s in the automations.yaml. I checked and made sure that I have the

automation: !include automations.yaml

in the configurations.yaml. I also have several other automations already in the automations.yaml that are working just fine (however these automations were built in the UI instead of being written directly into the .yaml file.

So what am I doing wrong here?

Welcome to the forums!

What is not working? If your automation is not showing up, then you didn’t reload automations in Developer Tools.

Thanks for replying! Yeah sorry, I should have been clearer with “what is not working”. When I move the automation to the automations.yaml file it just fails to “fire” at all. I’m not really sure what sort of debugging tools I can use to add further information → please let me know what I can do to troubleshoot the issue.

As for “not reloading” I can confirm that each time I update the yaml files, I restart the entire HA server to ensure everything gets updated to the latest config.

So the automation appears in the editor, but it doesn’t seem to be executed, right?

I would look at the automation trace as well as the event listener.