Custom card with stock HA UI elements

Hello.

I’m trying to create a custom card that autmatically finds and lists all light and lock entities in my system. I’ve managed to query hass in order to do so and I can output a simple HTML list to a card. I would instead like to re-use the built-in hui templates e.g.: hui-toggle-entity-row but I have not been able to find an example of how this is done. I see other custom card types doing this, but in examining their code, I can’t figure it out.

I’ve been trying to follow examples here:

The second example is close to what I’m looking for, but it would be great if this instead used the native UI elements seen elsewhere in HA.

Can anyone point me in the right direction to learn how to do this?

Thank you!

  • Jeff

Did you manage to make any progress on this? I’m looking to embed existing cards into a custom card.