Clooos / Bubble-Card

Bubble Card is a minimalist card collection for Home Assistant with a nice pop-up touch.
MIT License
1.44k stars 39 forks source link

How to reuse Bubble Pop Up Cards #592

Closed Axydas closed 6 days ago

Axydas commented 2 weeks ago

THIS IS NOT A BUG

I just want to know how I can re-use a Bubble Pop Up Card without copy-paste it. Specifically, I have a dashboard with various views and some popups need to be reused in different views. The only way to do it is to copy and paste the code to the various views.

Is there any way to create one view specifically for the pop-up cards and universally use them to the whole dashboard?

elbel86 commented 1 week ago

I agree this would be a great feature. I wish the popup would open a sub view instead of a vertical stack card. Then you could link them from anywhere.

pgale commented 6 days ago

You can use the Raw Configuration Editor to copy and paste large sections of code. Not elegant but works as long as you copy and paste the right bits and make sure indentation is correct. Not ideal but works.

Clooos commented 6 days ago

This is possible with YAML anchors but this is only for users that only use the YAML mode (in this mode the editor is disabled).

But my recommend way to use Bubble Card is to have everything on a single view divided into multiple pop-ups.

The @pgale solution is working too.

I'm not planning to add an option for that at the moment because the cards must be on the same view to works.

This Home Assistant limitation is probably too difficult to workaround with the way Bubble Card works.

I'm closing this for now but this is still my mind since the very first release.