Can button icon represent multiple states?

I have pretty complicated dashboard with a lot of devices, so few of them which have multiple functions I moved to pop up sub-menus with browser mod. In below example thing is that main button changes color to orange only when spa is heating, not when I turn on bubbles or filtering alone. Can I somehow link few entities states to have them change main icon color as well? It would be even better if they could have separate colors but this is just cosmetics, I will be satisfied even without it. I need that also for lawn watering (few sections can be run seperately, but currently only one is linked to main button icon) as well as for leak sensors (I have sub-menu with all leak sensors listed, but I need that any of them could change main icon state, not only the one which is linked to button)

      - show_name: true
        show_icon: true
        type: button
        icon: mdi:hot-tub
        name: Jacuzzi
        entity: climate.spa
        grid_options:
          columns: 3
          rows: 1
        tap_action:
          action: fire-dom-event
          browser_mod:
            service: browser_mod.popup
            data:
              title: Jacuzzi
              target:
                device_id: dd902a1fafdfbdb69d60722ba32aa964
              content:
                type: vertical-stack
                cards:
                  - type: entities
                    entities:
                      - entity: switch.spa_power
                      - entity: switch.spa_filter
                      - entity: switch.spa_bubbles
                      - entity: switch.spa_jets
                    show_header_toggle: false
                    state_color: false
                  - type: thermostat
                    entity: climate.spa
                    features:
                      - type: climate-hvac-modes
        icon_height: 45px

Not sure if the standard button card can.
Most users use a custom button card which is much more versatile.

1 Like

The simplest approach is probably to have the button on a conditional card for each colour. You would only ever see one card at a time, so it would look as if it was changing colour.

1 Like