All automations turn off and become uneditable

Well…I wasn’t there… :wink:…but if you are missing those too then I would say yes those are probably it. :slightly_smiling_face:

I don’t use the editors for anything but I know you need the include for scripts.yaml and I’m pretty sure that you need the include for scenes.yaml (which i don’t use at all even in yaml so I don’t know much about what’s needed for those).

Haha…fair enough. They were three very similar lines, so I guess I need to put the other two back in. Thanks so much for your help!

1 Like

I believe this is no longer true. I’ve created ALL of my automations via UltraStudio and can edit all of them in the UI today. It’s been a year since your comment, so perhaps the UI editing has been improved.

Technically exactly what I said is no longer true. But in practice it is generally still true.

you can only edit manually created automations via the UI editor if you have added an “id:” line in the automation config AND they are stored in the automations.yaml folder.

I only add id’s to any automations that I have trouble with so I can troubleshoot using the automation trace so only a few of my automations contain them.

And I don’t store my automations in that folder since all comments are wiped out and the order of keys gets changed.

So in practice I can’t edit mine thru the UI.

Agreed. This all came up in a lively discussion on Discord yesterday. At that point, I figured out (remembered, actually) that the reason all of my hand-edited automations are editable is that I have an id: on each one. I don’t edit them with the UI ever, though, since like you say, it would wipe out my comments.

I may at some point separate them into two files so that I may use the UI, but atm I just use it to show me the basic YAML if I’m having trouble with format.

i believe tho (and may be wrong) that just having any automation stored in the automations.yaml file will also automatically wipe out comments even if you never edit them thru the UI.

I think…maybe…

I think there was a “PSA” by Taras a while back in which he was caught out by this and the end result wasn’t a very happy surprise. I’ll see if I can find it since I may be misremembering the issue he had.

Here it is:

and it seems as if the issue happened when he edited a single automation via the UI editor and when he saved that one automation HA reformatted the hole file and wiped out every comment.

So if you never save an automation via the editor you should be OK.

So beware of even trying it.

This.

I highly recommend separating manually created automations from the ones composed using the Automation Editor.

If I recall correctly, I was helping someone and wanted to try an experiment with the Automation Editor. One thoughtless click of the Save button and everything that had been commented out was toast (and my automations were reformatted into the Automation Editor’s preferred style).

2 Likes

Excellent points, and I think I did somehow know that, because I’ve never even really built an automation using the UI, because of fear of corruption. But as Taras points out, perhaps it’s time to move mine to another file, just to be safe. It’s one line of YAML to change, a renamed file, and a restart. Worth it. Cheers.

1 Like