Do you maintain your own Lovelace yaml or let HA do it?

we are talking about editing yaml file (YAML mode) vs using Lovelace GUI editor (GUI Lovelace), aren’t we?
I don’t understand how people claim they benefit from both modes if one cannot use the simultaneously, and it’s impossible to switch between them while working on the same yaml file as apparently only in yaml mode you can edit a physical file because in GUI mode HA has the data somewhere inside it.
Or am I wrong?

This.

I’m perfectly willing to use an all-GUI approach if it provides advantages. Otherwise, it’s a tough sell to make users switch to a less competent management tool (GUI or otherwise). If the GUI makes editing and managing the system more convenient then it sells itself.

FWIW, the openHAB community is currently doing some soul-searching as it attempts to move to a more approachable, novice-friendly GUI. The first attempt was Paper UI, introduced in version 2, and was a departure from version 1’s all-text configuration. Long story short, the transition was less than successful. Discussions are now centered on learning from past mistakes and making a success of it in version 3. However, text-based users are adamantly opposed to an all-GUI approach despite assurances that it can be easily exported to JSON files for sharing/backup/versioning/etc. They’re understandably leery in light of Paper UI’s belly-flop. I expect similar soul-searching discussions to develop here as well.

When a GUI is done right, it makes managing the system easier (not just for novices but for experts as well). It displays things more clearly, lets you organize information more easily, depicts certain data graphically, yet allows you to export your data for use in other ways. I’ve used another home automation system (Premise) for over a decade and it offers such a management tool. I’ve never thought it would be easier to use if I could edit it as text files. That’s the earmark of a well-designed GUI.

As for Home Assistant, it’s early-days for its GUI and I much prefer to use Visual Code to configure the system. I appreciate the fact I can continue to maintain the configuration as text files but would jump ship to a GUI if it offered advantages. Time will tell.

1 Like

Yes. He uses the front end to edit his configuration to his liking. Then he copies everything out of the frontend RAW EDITOR, to a yaml file, and can make comments for tracking changes. So he gets the benefits of using the frontend GUI to configure, and a yaml file for version control.

But that’s his own unverified yaml and if he makes a mistake, nobody will know until he decides to load it back to the editor. OMG

It’s LITERALLY copied from the front end raw editor…OMG

I’d love to see the whole code in front end raw editor as currently it’s like looking in a pinhole and making your own patchwork duvet, not quite the same if you know what I mean.
Spent some time today playing with rearranging cards into stacks and have to say I don’t like that combined approach, despite liking the ability to see changes immediately.

Nope. You’re not wrong at all. I think you are understanding it perfectly.

I’m pretty much in agreement with everything you said.

Well, I think I know a bit more now… until now I thought that the only way to edit cards is to

  1. click on Configure UI (top right 3 dots), then
  2. click EDIT on an appropriate card and then
  3. TOGGLE EDITOR at bottom left.

But if after step 1 you click on top right 3 dots, there will be Raw config editor, which apparently spend the whole internal UI yaml.

Oh well… it makes a huge difference. At least I don’t have to make those 3 steps every time… :wink:

Apologies for everyone whose ideas I misunderstood because of that little fact.

Agree. Currently HA GUI is far from ideal and way too restrictive.

I understand your confusion and you are right and wrong.
I do most edits in YAML file and then use the raw editor to cut/paste to the GUI in the Raw Editor.

Minor stuff or if I want instant style feedback I make changes in the GUI mode and then copy that to my yaml file. So I keep then in sync but manually.

I do have a fair few comments in the YAML file but the raw editor doesn’t save them of course.

I went with Yaml mode and so far I prefer that way.

I started using Lovelace around 0.79. Used the Lovelace migration tool/plugin to generate ui-lovelace.
Slowly grew up to this. Still a work in progress. Still using the YAML mode.

Thanks!

I don’t think I could ever let HomeAssistant take over completely. I depend on my comments remaining in the file to know what exactly was the intent behind some of the crazier bits.

1 Like

I concur. Being old school where we would print out the entire source code on fanfold greenbar paper and lay it on the floor so we could crawl around and look at “the big picture” all at once… makes it difficult for me to code looking at MY big picture by just peeking at one part at a time.

1 Like

I’ve tried the gui a few times, it’s soooooo slow to enter stuff, particularly recurring config that can be cut and paste in no time.

I can’t see a way around that, I think there’s two different audiences - some people are going to want to push the frontend to it’s limits and they’re going to want yaml mode; others will want to tinker a bit, get more flexibility than commercial offerings but not invest so much time, they’re going to want gui.

I just hope that it always retains the ability for hackers to create cards, themes and custom layouts to do whatever they want. But I’d also like it to gain the user base that will only come from making it more accessible.

Don’t feel bad, I just learned there is a YAML mode option!

What I’d been doing is going into “raw” mode and copying it over to a text file in a backup folder. Then I could play with the live raw file with the knowledge I could always restore to a working version.

I don’t really get why comments aren’t allowed, presumably the Lovelace code which creates and maintains the YAML internally (never did find out where that’s stored, btw) wasn’t written to maintain things in their original sequence. Maybe that’s the real fix here.

The ideal would be a YAML file that both the end user, and the automatic process, could change. Sort of like the configuration.yaml file.

Meanwhile, it seems there are enough different options to keep everyone happy doing their own thing. And in my case, learning new things.

The lovelace file isn’t stored as YAML it’s stored as JSON and when you go into raw mode it builds YAML for you. It’s in your config directory in a .storage folder. Called lovelace. .storage/lovelace

1 Like

Found it, thanks! Now it’s all starting to make sense.

Just out of curiosity, would it be possible to just edit the JSON file directly?

No you should not edit any files in storage. Use the GUI to make any changes. You really can only edit those JSON files if you stop home assistant first. The best thing for Lovelace is to use the GUI editor or you can cut/paste in the raw editor or use YAML mode…

1 Like