Reflect "input boolean" change in status on lovelace dashboard by chaging icon color

I have an Input Boolean titled “shuffle_toggle”. I am using a custom button on the dashboard to toggle states. In addition to toggling the state, I am trying to change the color of the Icon based on the state of the input boolean. here is the code:

type: custom:button-card
entity: input_boolean.shuffle_toggle
show_state: true
name: Shuffle
  - value: 'on'
    color: limegreen
  - value: 'off'
    color: grey

When I press the input boolean, it changes state, but does not reflect the custom colors, why?.

You’ve capitalised the word ‘state’.


Thank you, everything works perfectly. This was the last piece in a longish beginners project: I was stumped.

As hard as I tried, I did not see the capital S…

No problem, I know this too well :grin: