WTH can't I use the automation editor if automations.yaml is in a different folder

In order to keep my files nice and orderly I’ve put a bunch of them into separate folders.

For example I have _components folder for my sensors.yaml, input_boolean.yaml, light.yaml, etc and an _intelligence folder for my automations.yaml, scenes.yaml, and scripts.yaml.

Why can’t I just point the front end to this folder and have the editor work from there?

I’m not quite sure if this solves your issue or not. The automations.yaml does have to remain in the /config/ folder. However, I do most of my automatons in separate files under the /config/automations folder. However I wanted to be able to play with the Automations editor UI occasionally. So I found that I could define Automations twice in the configuration.yaml.

automation yaml: !include_dir_list automations
automation: !include automations.yaml

P.S. Unfortunately, it doesn’t seem possible to do the same with scripts:.

2 Likes

This doesn’t solve the issue.
It is not possible to edit the automations in the automations folder via the gui.
You can only edit the automations in the automations.yaml via the gui.

Yeah, that’s what Brian was implying.
The GUI editor also strips out comments and re-orders keys to alphabetically sorted.
So a LOT of people use @BrianHanifin 's technique to separate the GUI editable automations from the hand crafted.
BTW ‘hancrafted’ here could just be ones that you created under the GUI, tested, have found to be stable and moved to the ‘other’ folder so you can protect it, add comments and make easier to read by sequencing the automation in human readable format.
If you want to use the GUI editor that requires an automations.yaml which has to live in the /config/ folder

3 Likes

Well, I can see that if you want to use the GUI editor now, it requires the automation to be defined in the automations.yaml which has to live in the /config/ folder.

But, isn’t the WTH month to address such points?

An automation should have a unique name, so, can’t the yaml of that automation be updated using the GUI editor? And even keep the order how you defined it?

An extra note yaml field could help with comments.

Sorry to pick up an old thread, but I figured as I made it here probably others will too.

I ran in to the same issue as TS in regard to not being able to edit an automation that I wrote in the automations.yaml file. Turns out the GUI expects certain automation variables to be filled before it will let you edit the configuration through the GUI.

Example automation, that will work but won’t be editable:

   alias: Fibaro Button Test
   description: Checks if this button will actually work
   trigger:
     platform: event
     event_type: zwave.scene_activated
     event_data:
       entity_id: zwave.fibaro_button
       scene_id: 1
       scene_data: 7680
   action:
   - service: light.turn_on
     entity_id: light.study

–>insert before picture here<-- new user restriction

Added id, condition and mode (not sure if all are mandatory):

- id: '1234'
  alias: Fibaro Button Test
  description: Checks if this button will actually work
  trigger:
    platform: event
    event_type: zwave.scene_activated
    event_data:
      entity_id: zwave.fibaro_button
      scene_id: 1
      scene_data: 7680
  condition: []
  action:
  - service: light.turn_on
    entity_id: light.study
  mode: single

Tadaaaa:

final note: I did have to restart HA for the changes to be visible in the Automations overview.