#"Graying out" buttons based on condition

1 messages · Page 1 of 1 (latest)

austere veldt
#

Hi everyone,

I was just wondering if there was a way to "gray out" a button or "disable" a button without making it disappear from the dashboard. Basically, I want to freeze certain buttons from working while my Robot vacuum is running to make it more "family friendly"

I'm familiar with the conditions and such, but I can't figure out a way to make a button(s) non-functional rather than making the entire card disappear

toxic shuttle
#

There's nothing built in to HA that will let you do that but that's not to say you can't get something to work. To prevent a card from being "clickable", we have to turn off the pointer-events. With the custom:butt on-card,you can define a state template for the "disabled" state. For most other cards, you can probably use card_mod. (Note: In my example, the stock button card's icon does not return to its "active" color; it probably just needs both active and disabled colors defined.)