Manage automations


If necessary i open a request for each of the improvement ideas.

As most users i wrote my first automations using the UI editor. As some automations get more and more sophisticated and complicated i’m now on the point to move some out from automations.yaml to separate files which get included from the configurations.yaml. (After struggling with the documentation. It’s now “working”). The following points are the handicaps and or problems i found so far. I list it together with → ideas how it could be solved. BTW: The reason i put the more complicated automations in separate file is DOCUMENTATION: I learned that when using the UI editor comments are not allowed (except in the documentation field). Documentation is essential to understand what the programmer had in mind.

  • no comments allowed: → I propose to introduce a “comment” field in every section: Trigger, condition, action, choose, … This alone would eliminate the need to split automations into separate files, in most cases.

  • New function in UI editor: Save as … : → to save an automation as separate file instead of within the huge automations.yaml. I realised that moving an automation away is hard work, and error prone.

  • Yaml within UI editor: The information text in a yellowish box preceding the YAML code uses to much space. → either allow a more advanced mode that simply hides this information boxes, OR squeeze it to a single line. → Similar: hide/eliminate all the explaining text in almost every section. Its not anymore needed after a while.

  • The automations overview shows UI enabled (automations.yaml) and MANual automations without any differentiations. When trying to edit a manual-mode automation a info box pops up saying ´´Only automations in automations.yaml are editable´´ - stupid! → Make manual-mode automations visible as such: different color, icon,… → allow a code editor to be called to edit such automations.

  • The automations overview should… → allow to directly open the YAML editor. Without calling first the UI editor. → show the documentation text field. → should have an option to print the automation.

  • x-ref of all used resources: Over the short time i’m using HA and writing automations i more and more use Helpers, Scenes, and scripts. → There should be a cross reference that helps keeping the overview.

I like the UI editor, it generates error free code. But it uses to much space on the screen and does not allow documenting comments.
.

Hi everybody. Is this entry too long? no reactions after 24h. Strange!

1 Like

I wouldn’t say it’s too long. Is is quite well organized.

I don’t think standard YAML comments could be used for this as the parser library would probably strip them out. However, you can use the alias field to add comments that are not stripped out by the UI automation editor. Unfortunately, the UI editor does not seem to support them properly and falls back to YAML mode. I think UI for that shouldn’t be that hard to implement and it would be a good addition. There’s a feature request for that already, so upvote if you are interested: Add support for "alias" field in UI mode · home-assistant/frontend · Discussion #8622 · GitHub

I think I’d be worried that the UI editor could now destroy other files and not just automations.yaml

Good idea. Personally, I think other elements take up even more vertical space, but this would certainly be an improvement. Maybe something like <details>.

Single line summary

Longer explanation of what’s going on
and how to fix it.

Start a feature request if you don’t want to implement it yourself.