Request: Comments in automations and scripts

In automations and scripts, would be fantastic to be able to insert unparsed Comment: at each step to help remember why script was written in a certain way. Even in YAML only to start with would be great. Could be “hidden” behind the menu like the “Trigger ID” now is to keep the GUI clean.

Good idea!! Voted.

Meanwhile, this FR reminded me to try something I saw near the end of the document Splitting up the Configuration: I created a new !include file called my_automations.yaml. I copied a couple of automations from automations.yaml to the new file. Now I can edit them to include blank lines and comments. Here’s my configuration.yaml change:

automation ui: !include automations.yaml
automation manual: !include my_automations.yaml

I can still create new automations using the UI, but I can’t edit the ones in my new include file. They show up on the list, and I can enable and disable them, but if I try to edit I get a dialog saying “Only automations in automations.yaml are editable.”

I sometimes use the UI to get started with a new automation. Other times I copy and paste the YAML from an example. I rarely use it to edit existing automations, so this seems like a pretty good workaround.

You can go crazy creating a bunch of automation files using !include_dir_merge_list but with the ability to include white space and comments, I’m good with just the one file for now.

I just realized I needed this after combining about 8 automations into a single one. I will need to document the steps somehwere for now. I hope this is on someone’s radar/todo list to implement.

Closing as a duplicate, please vote and comment here:

1 Like