ngocjohn / vehicle-info-card

🚙 Home Assistant Custom Card for Mercedes Vehicles
https://ngocjohn.is-a.dev/vehicle-info-card/
MIT License
43 stars 13 forks source link

How to associate a sub card with a button #46

Closed bradkemper closed 2 months ago

bradkemper commented 2 months ago

There is an example of using an entities card for the Vehicle status button. But how do you tell it that the card you created is the one to substitute for what you normally see when you press that button? Is it just by matching the card title to the exact words of the button?

bradkemper commented 2 months ago

It would be great if we could add any button there and associate it with any card.

ngocjohn commented 2 months ago

Hi @bradkemper ! The basic inspiration for the card comes from the ME app. I’ve chosen 4 buttons that I think best represent the main vehicle status. I’ve set up these buttons for the card accordingly.

If you’d like to customize individual sub-cards, you can easily do that using the YAML editor and adding any Lovelace code you like.

The simplest approach is to create a new card the usual way, then just copy the code over to your specific card as needed. Hope this helps!

CleanShot2024-08-24at21 01 24-ezgif com-video-to-gif-converter

About the possibility of cutomization of buttons, I will try to add this function as well 😄

ngocjohn commented 2 months ago

New options for customizing buttons and sub card added. You can try it now in the pre-release or in the new release soon. CleanShot 2024-08-25 at 08 31 59@2x

bradkemper commented 2 months ago

Nice!