I’m excited to share a new custom card I’ve built for Home Assistant: embedded-view-card – a card that allows you to embed any existing view into another, either statically or dynamically, using native Lovelace layouts.
What it does
This card lets you reuse entire views inside other views – perfect for building modular dashboards (e.g. menus, headers, footers, room sections, etc.).
You can:
Embed a view from the same dashboard
Choose the view statically or dynamically (e.g. via input_text)
Preserve the original view layout (type: panel, sections, sidebar, etc.)
Seamlessly integrate it into grid-based dashboards
Use it with or without ha-card wrapper
Fully supports YAML and UI dashboards
Demo:
How to use
Install via HACS
Add the repository manually: https://github.com/redkanoon/embedded-view-card
It would be great if I could select views from other dashboard by using a relative path, e.g. ..\office\lights in the view_path (even if I had just the option to type it into the editor).
This would allow me to create a dashboard that only holds the modules (one per view) and one that builds complete views based on the modules from the other dashboard. This way the pieces don’t get in the way of the whole views.
I’m probably just being a little dense here, but I can’t make the ‘dynamic’ version work - whatever I select from the ‘Entity’ dropdown after picking ‘Dynamic’ in the ‘Select View’ dropdown, all I get is an Error loading view: View not found:
message
This one might just need a little more explaining.
That was actually my initial idea as well, but I didn’t manage to get it working properly at the time. It’s still on my list though, and I definitely want to come back to it.
You’re right – the dynamic mode could use a better explanation. I’m planning to create a short GIF to demonstrate how it works. In the meantime, feel free to try the YAML version instead. I’ll include the YAML snippets for the helper, the view, and the action to the main post to make it easier to follow.
Thanks for your feedback.
I hope this card will be useful for the community.
Yes, embedded-view-card should works with ui_minimalist, as long as it’s used in a standard Lovelace YAML dashboard. Just make sure to disable the default ha-card wrapper if you’re embedding it inside minimalist sections or templates:
"Yes, starting with v2.1.0 cross-dashboard embedding is possible .
Standard and custom dashboards are working, but I haven’t fully tested the auto-generated views like Music Assistant or Map yet. If you try it out, let me know how it works for you – feedback is very welcome!"
Great enhancement - now I only need to find the time to re-do my complete dashboard setup for all users based on modules.
One thing I haven’t been able to try yet is this:
I have a view in a dashboard, that’s not visible to all users.
Can I link to that view for the dashboard of one user this view is normally not visible for?
I assume it’s not, but it would help to keep the dashboards for other users much cleaner, e.g. hide all the ‘modules’ and make only those visible through this card that I want them to see in their own individual dashboard.
The card only works with real Lovelace dashboards/views. Panels like Music Assistant, the generated Areas panel, integrations such as Home Maintenance, or even the special lovelace/0 are not Lovelace-based and can’t be embedded. They should already be filtered out in the dashboard dropdown.
If you want to display them inside a dashboard, an iframe card might be the only option.
Very good idea and work. Congratulations…
I use this code a little differently.
Panel view
Horizontal stack card
Card1-Live 3D home plan works with three js
Card2-Vertical stack for Embedded View Action Codes “tap action”
Card3-Embedded View card with css (card-mod)
Is it possible to call cards?
Is there a close action? (I used***data: value: dashboard-test/empty)
Some css (bottom, right, left etc) The positioning of the cards behaves differently and cannot find their place properly.
Can anyone advise me how to use CSS (Card-Mod) effectively?
Thank you in advance to those who will help
I’ve started on a modular dashboard setup and ran into an issue:
I haven’t found a setting yet, that works when I want to integrate the module view into an existing view so that it fully lines up with the other cards.
I’ve tried a lot of different values for the ‘Bleed inline’ and the ‘Bleed block’ but can’t get it to work so that the embedded view card lines up with the other cards in the view.
I seem to be able to be getting it right for one view or the other, i.e. one or more, but not for all of them.
And then viewing it in the mobile app does something different again - the bottom card is the embedded one:
Action support will be implemented in the next version. I’m currently working on it, but unfortunately I’m running out of time at the moment. As soon as it’s available, I will post an update here in the forum.
A dedicated close action is also something I will look into during development. It sounds useful and should be technically feasible, so I’ll test whether it can be added to the next release as well.
Regarding the CSS: I’m not fully sure yet what the exact issue is, and I’m not experienced enough with complex Card-Mod positioning to give reliable advice here. If you can explain a bit more about what happens on your setup, I can try to understand the problem better.