Custom button card with state from binary sensor

I use custom button card to send IR-commands to my amplifier with a defined switch.
I want to change color of the button to yellow when the amplifier is on, I identify on and of with a power plug and a binary sensor.

Is it possible to change color of the button depending of the state och the binary sensor?

I can not find out how or if it is possible.

Hi, did you manage to solve this?
I want to use this card to toggle open/close my garage door and at the same time show the status of my binary switch on the door if it is open or closed. Do you have an idea of how to solve that??

You could try something like this - my door fridge binary sensor:

type: custom:button-card
entity: binary_sensor.refrigerator_door_open
color: red
show_state: true
state:
  - value: 'on'
    color: rgb(219 68 55)
    icon: mdi:fridge-variant-alert-outline
  - value: 'off'
    color: rgb(66 133 244)
    icon: mdi:fridge-variant-outline
name: Door