I am looking for a Button and Switch card that can be disabled or locked. The ideal behavior would be for the Card to display a lock icon when locked and, when touched, do nothing. In my case, the lock state of the Card would be driven by automation.
My use case:
I would like to have a Button that will open or close a garage door. This Button would be locked when my alarm is set. I would have a sensor or state (sorry, newbie to HA) called something like Lock_Garage_Biutton, which would be true
when the alarm is armed and the garage door is closed. When the alarm is disarmed, Lock_Garage_Button woulkd become false
. When Lock_Garage_Button is true
, the lock icon would display on the Button and the Button would be inactive. Otherwise, the lock icon would be hidden and the Button would work as usual.
I know that I can use an automation to prevent the button from doing anything when the alarm is set, but this is not a good user experience as it is not clear to the user that the button has been disabled.
I have looked at the Button Card on Awesome-HA and available thru HACS, but it appears that touching the button of this card changes the lock state.
Any suggestions would be helpful.