Yes and that is the really sucky thing about the storage mode of lovelace… It’s 90% of the reason I make changes in ui-lovelace.yaml and cut/paste those to the raw editor.
I am doing the same thing: copy and pasting it but when I save, this is what happens. So I guess there is nothing I can do about it. It’s just really confusing when you go back and try to read the code.
I guess I still don’t get why people are using the GUI mode for lovelace and using the raw editor to copy/paste code from the ui-lovelace file. If you are going to all of the trouble to manually type everything into the raw editor every time you make a change anyway then why not just use yaml mode and be done with it?
You then save a step or two of opening up a couple of windows and copying/pasting the contents from one file to the next with the added possibility of errors being introduced that operation brings. It seems you are giving up the “supposed” benefits of the GUI editor and not gaining any of the benefits of yaml mode. specifically, the GUI editor not rearranging your config and the even bigger benefit of using !include to be able to split up your config into manageable pieces.
I still really like the ability to split up the config to make it more easily digestible that yaml mode allows. especially if I’m making manual changes anyway.
How do you synchronize the two configs? I assume if you change something thru the GUI that change will no longer be reflected in the yaml file. Wouldn’t you need to copy the entire lovelace raw file (that sounds like the GUI has inconveniently reformatted for you) to an external editor then make your changes then copy it back into the raw editor? then save and refresh?
Not trying to be difficult. Just trying to understand the benefit of one method over another. I may be doing it wrong and need to switch!
I usually only make a minor change… like change the css or something like that and then when it’s convenient I’ll manually make the same change in the YAML file. I do like the instant feedback in the GUI and in the GUI, you don’t get the whole lovelace file - just the specific card/stack you are editing… so not quite like using excludes but easy enough. (You only get the whole file in raw editor)
I never said it’s ideal but it works for me and gives me flexibility.
How hard is it to switch back and forth? And more importantly, what hidden .storage files is it going to create/edit for me that I’ll have to struggle with to remove if I don’t like it? You know what happens when you give “Big Brother” a little bit of control. You’re life will never be completely your own again.
It’s not that hard… just delete the yaml mode line in config yaml… it will then create te storage file. To switch back add the yaml mode again and restart…
Sorry, I’m old school… from back in the day when we were called programmers rather than coders. We also used the discipline of self documented code (anyone using the variable name x was mocked)… and I am really annoyed that my self documented code (those lines that start with a # ) are discarded.
Yeah, I probably won’t really end up trying it… The key phrase there that gives it away is “if I find the time”. Fat chance of that ever happening. I can’t find the time to keep up with the stuff I need to get done let alone mucking around with things that already work well.