custom-cards / button-card

❇️ Lovelace button-card for home assistant
MIT License
1.83k stars 227 forks source link

Add `disabled` prop to card #838

Open behindthebeard opened 3 months ago

behindthebeard commented 3 months ago

Is your feature request related to a problem? Please describe. I have a dashboard, where I am controlling an automatic gate. Two buttons, one opens it fully, one just to walk through. I am having the state of which kind of opening was triggered in booleans. I would like to disable one of the buttons if the other one was pressed.

image

Here the top one is the fully opening trigger, and it doesn't make sense to leave the second button enabled if the first one is pressed (and vice-versa).

Describe the solution you'd like Having a disabled prop that would take a template would solve the problem described above.

Describe alternatives you've considered I know that conditional rendering would solve this, but I think disabling a button would be helpful in other scenarios as well.

Additional context Thanks for considering this as a possible feature 🙏