Hey everyone! I’ve been diving into customizing my Lovelace UI lately, and I wanted to share my journey in case it helps anyone else who’s tackling similar challenges.
Earlier this week, I decided to reorganize my Lovelace configuration by splitting it into separate YAML files for better management. I thought it would make things cleaner, but things took a turn when some of my views started disappearing and a blank ‘Unnamed View’ popped up. At first, I was a bit puzzled—why would this happen after such a seemingly straightforward change?
I started by reviewing my ui-lovelace.yaml file. Here’s what I had:
yaml
views:
- !include /config/lovelace/my_view.yaml
- !include /config/lovelace/view_garden_version2.yaml
Looking at the included files, I noticed that both my_view.yaml and view_garden_version2.yaml were structured correctly, but I realized I might have missed something in how Lovelace handles included files. After some research and trial and error, I discovered that each included YAML file should have its own views: section.
Here’s the corrected structure I ended up with:
yaml
ui-lovelace.yaml
views:
- !include /config/lovelace/my_view.yaml
- !include /config/lovelace/view_garden_version2.yaml
And in each included file:
yaml
my_view.yaml
views:
The key takeaway here is ensuring that each YAML file you include has its own views: array. It might seem obvious, but it’s easy to overlook, especially when you’re focused on organizing your files.
This experience taught me the importance of thorough testing after making configuration changes. I also found the Lovelace documentation incredibly helpful, even though I had to dig through it a bit.
If anyone else has run into similar issues or has tips for organizing Lovelace configurations, I’d love to hear about them! Let’s keep learning and improving together. ![]()