Automation editor changes

General questions on the built in editor.

The updated editor was changed so now you see each section as a yaml file rather than the whole automation. I find it difficult to edit in sections vs seeing the whole code. Not sure why it was changed. I do know you can edit the file directly with a text editor, but this doesn’t check the code like the built in one does. Since the file is a yaml file why doesn’t it let you make comments? Does anyone have the link on GitHub that I can ask the question to the people responsible for this code?

Comments don’t work with the editor, only when you do manual automations and as far as I know if you edit automations created with the editor and add comments manually it will delete them automatically. If you use Hass.io you can also use the configurator plugin to edit the whole yaml in the browser with some basic checks and you should also be able to check your whole config (dont know where exactly) before you restart.

You are correct that it deletes the comments. Not sure why as it is a yaml file and comments are allowed.
Also correct about editing it in Hassio. Easier for me via samba share and notepad++ set in yaml language. The problem with using this option is they are make changes in how automations are being done. I found if it works in the built in automation editor it will work with out causing other issues.

Sorry I don’t really understand this. What is the issue exactly? The fact that automations are created differently in the editor? (I hate the editor, it sorts stuff alphabetically and uses this long number device_id as identifier instead of the entity_id and stuff like this)

There are formatting changes. Some of the condition statements that use to be allowed in the automations are no longer allowed. I copied examples from the docs and they failed, changed only the entities and they failed.

Can you show one of the non-working examples from the docs? Generally the examples from the docs should work, however there are always some small errors to be expected.

Agreed. The GUI editor isn’t everyone’s cup of tea but it’s vastly improved from before and I am not aware of any conditions not possible in the new editor either. You can put one comment in (description) at the top.

Lovelace RAW editor is YAML as well (although it converts to json when you save it). It doesn’t allow comments either. Generally none of the GUI editors allow you to make and store comments - if you don’t like that then edit the yaml manually.

1 Like

I understand that the Lovelace editor converts it to Json, but the automation editor does not. The raw editor also handles code differently. If you create a card using the built in ones or create the card in the raw UI the code is slightly different. As a new user trying to understand formatting the inconsistency has been difficult to understand. To learn HA, I have been using examples from the many docs and user forum posts. I think for consistency (for me at least) going to yaml maybe easier.

Looking at all of the posted automation links in the examples, everyone of them has comments. Hard to remember why you do something without them.

I know that HA is moving more to gui interfaces. I would hope the underlying code would be the same no matter what editor you using and HA would use how it handles the configuration.yaml file as a model. This file has been easy to learn and customize.

No one is forcing you to use the GUI editor. I use YAML anyway for that. You have the choice to use what works for you and that’s going to differ from other people.

It has taken me a while to figure out all the different ways to do things and what works best for me. I like to try the built in first. If it doesn’t work try to figure out why? Works as designed or a bug? It seems all the experienced users I have communicated with use yaml. Looks like it is time for me to fully jump in and switch.

Most advanced users are using YAML due to the limitations of the Automation editor. E.g. I think templating is not supported in the Automation editor but lots of people, even beginners, often need templating.

1 Like

I’m convinced that I need to switch. First for automations and then Lovelace.

2 Likes

this thread shows again the glaring flaws in how HA is implementing the UI editors.

Since the editors are limited in functionality and even the functionality that does exist doesn’t mimic the way that most users actually program their code it frustrates new users trying to figure out “why doesn’t this work or look like the millions of examples in the forum or the docs?”. Then many don’t understand that there is even the possibility of doing it in other ways and get stuck at the basics.

1 Like

Thank you for your reply. You stated the problem much clearer than I did. Now is there a way to get the problem defined so that the many developers understand the issue?

TBH, I think they probably already know unless they are just being willfully ignorant of all the complaints about it over the last several months.

Hopefully it’s just that they haven’t had the time to thoroughly work on it but the silence of the response on the forums has been pretty obvious.

I’m not aware of anything you can’t do in the GUI editor including templates.

I use a hybrid system for Lovelace… I maintain a yaml file but I copy and paste that into the raw editor. So if I want to play around and see how things look easily I can use the GUI editor. Then I can just save those changes in the yaml file for the future. It’s an approach that works well for me.

They know but their goal is for a new user to never have to touch yaml ever. That is where it is headed going towards version 1. Yaml will still be available for advanced users. A new user may not ever even find the forum if everything just works in the GUI.

1 Like

DavidFW1960David

I use a hybrid system for Lovelace… I maintain a yaml file but I copy and paste that into the raw editor. 
So if I want to play around and see how things look easily I can use the GUI editor. Then I can just save those changes in the yaml file for the future. It’s an approach that works well for me.

I’m not sure I understand the hybrid Lovelace you mention. How do you keep both active?

As to only using a gui, they are a long way away. Setting up simple automations to me has gotten much more difficult with the section approach. I find it very early in the development and buggy.

I understand what they are trying to achieve, but I do not understand why you can’t see the whole section of the yaml file you are editing. I would think to be consistent it should be similar to creating a card in lovelace where you can switch from the GUI to yaml mode and view all of the code of the card and then you can switch back to the GUI and see how it looks. Not sure why they would create a different method for the automation.

that is a complete pipe dream.

There are way too many inconsistencies in documentation, old forum posts, the reality of the limitations in the capabilities of the UI editors and nuances in trying to come up with “just the right logic” for a million different scenarios.

HA is trying to take a completely complex system that will try to mimic how a real human uses their home and is trying to condense it all down to a “point and click with drop-down” menus simple enough for the average person to use.

I truly believe that if it is “dumbed down” to that point then it’ll just end up just like every other system designed to appeal to the masses who typically can’t even program the clock on the VCR.

I use the GUI for testing and HA is configured to use GUI. I will normally edit in the yaml file and then use copy/paste into the raw editor. Like I said I only use the GUI editor when I am playing around and want instant feedback.

they are way closer than you think

I have not found it to be buggy at all. It may be less logical than using yaml but it works fine and a new user is unlikely to find an issue because they don’t have previous expectations. I think your generalisations are flawed. Do you have a specific example you can point to?

because hey are not showing you the yaml for the most part anyway. the GUI is hiding the yaml.

not a bad idea.

it’s a work in progress. Until now the automation editor has had zero love since it’s initial release and they added a bunch or stuff to make it functionally equivalent to yaml just in this release. I expect it will continue to evolve.

DavidFW1960David

I have not found it to be buggy at all. It may be less logical than using yaml but it works fine and a new user is unlikely to find an issue because they don’t have previous expectations. I think your generalisations are flawed. Do you have a specific example you can point to?

When I try to create a new automation it doesn’t work. I can’t add a sensor. Goes to a screen to add one. I paste in my sensor and it doesn’t stick. It stays blank. The only way I get past this is hit skip.

When I try to add conditions for sun. Does not work. Wanted to add the simple after sunset, before sunrise. Never got it to work correctly.