I don’t usually do this but I feel I need to vent about the transition to the current Lovelace storage method.
When I upgraded to 0.84.x, I figured I would go with the GUI method for Lovelace rather than sticking with YAML simply because I get the feeling that GUI is going to push YAML aside in the near future. That seemed fine at first given that my Lovelace screens all still looked the same.
Where things are not so nice is once I try playing around with custom-cards. Since custom-cards need so much code entered it doesn’t seem possible / sane to try and do it in the GUI Editor, so I go to Raw Config Editor… Well…in there I find that the automatic conversion from my old ui-lovelace.yaml file has been butchered to the point that my code no longer follows the layout shown in the docs.
Now for example, this:
resources:
- url: /local/custom_ui/tracker-card.js?v=0.1.5
type: js
…become this:
resources:
url: /local/custom_ui/tracker-card.js?v=0.1.5
- type: js
where the ‘-’ symbols are all messed around. But it gets worse. That was just the first few lines. With the rest of my near 1000 lines of code, the code for each GUI element (say a media_player) would be all upside-down, with the lines that were previously at the top of that section, being at the bottom. If I try to add new code in the Raw Config Editor and follow the rules of the docs, just like I did in my old YAML days, I get Lovelace syntax errors and can’t save. Thats because all the '-'s are in the wrong place.
So yesterday I copied all the ‘messed up’ lovelace code out of the Raw Config Editor and pasted it into the Hassio Cloud9 IDE and spent 3 hours re-configuring the '-'s to match the rules in the Lovelace docs. Now if I add extra entities and paste it back into the Raw Editor, it is happy and accepts my alterations… Hit save, all seems good…until I restart HA and go back in there and find that it has been jumbled up again… try at add more code, NO, the '-'s don’t suit the syntax rules. This is CRAZY!
My current solution is to keep a clean version of the Lovelace code in a file, make changes there and paste it back into the Raw Editor. This is not going to work long term.
On top of this, how the f@#! do you create nested vertical-stacks and horizontal-stacks using the GUI Editor? No matter what I try, it rejects the syntax. I really feel like the YAML method was better simply because HA didn’t mess with what I typed in. I really want the GUI editor to work as I think it is the way of the future for this project, however its current implementation is far from where it needs to be. Custom-cards are awesome but I feel there needs to be a simple way of pasting them in without them causing dramas with the rest of the GUI. Say if they can be containerized some how.
Is it just me having trouble with Lovelace getting jumbled up since 0.84 or what? How is everyone else dealing with adding GUI elements manually?