#Customizing a custom:button-card

1 messages · Page 1 of 1 (latest)

cursive tangle
#

I'll try to take a look at it this evening when I get home from work. Post a link with your current code and I'll see if I can adapt something from Minimalist into your card.

fervent summit
#

I have no code for a button-card. I gave up very quickly after seeing how convoluted MinimalistUI was. Here's the code for the area card.

#
title: Lounge Room
hide_unavailable: false
shadow: false
tap_action:
  action: navigate
  navigation_path: ./lounge
entities:
  - entity: binary_sensor.lounge_room_occupied
    tap_action:
      action: navigate
      navigation_path: ./lounge
  - entity: sensor.lounge_temperature
    tap_action:
      action: navigate
      navigation_path: ./lounge
  - entity: light.lounge_room_lights
    tap_action:
      action: toggle
  - entity: climate.lounge_ac
    tap_action:
      action: toggle
cursive tangle
#

So, here's the thing. That card is specifically written in such a way that you really can't add anything to it other than what has already been integrated by the developer. I looked at the code for the card, and, honestly, I don't know enough about TypeScript to understand what is going on. What you're wanting would require adding code into the minimalistic-area-card.ts file. Essentially, the card would have to be completely customized for what you want.
Honestly, it wouldn't take too much (maybe a little bit of work) to replicate the minimalistic-area-card but in the form of a custom:button-card. For that matter, it would be possible to "embed" the minimalist-area-card into the custom:button-card and then add another button like what you want on top of the minimalist-area-card...

fervent summit
#

Thanks for looking anyway. Will live with what I have for now and tackle button card when I can find a good tutorial on it that doesn't have decades of assumed CSS knowledge 😛

cursive tangle
#

custom:button-card doesn't use CSS; it has its own internal styling. Note that button-card and custom:button-card are in no way the same thing. I first started working with the frontend with the custom:button-card several years ago. It's arguably one of the more powerful/useful cards.