Hi
I create an automation. It wasn’t work how I would like to. I changed the yaml file in the editor, and unfortunately changed the code back.
For example: trigger to triggers and cleared the comments #
The Automation Editor uses the latest YAML scripting syntax. triggers indicates the section containing all Triggers. In the past, the section’s name was trigger.
The Automation Editor doesn’t support the use of YAML comments.
You can use a text editor, instead of the Automation Editor, to create automations. However, you have to instruct Home Assistant to keep your “manually created” automations separate from the ones you create with the Automation Editor.
As @123 said, don’t mix manually-edited automations with GUI-edited automations.
In my configuration.yaml:
automation: !include gui/automations.yaml # this is only for GUI-Automations, do not touch this file!
automation manual: !include_dir_merge_list manual_automations/
You can put the automations.yaml file anywhere you want, just make sure the !include points to it.
All of my automations wind up in my manual_automations folder specifically to keep comments and to make human-readable -id: keys. It’s also easy to make separate yaml files for each automation.