Show Button Status

I want to hide a switch from the dashboard and insert a button to a) only turn on, not off and b) allow another automation to run at the same time. This does exactly what I want

show_name: true
show_icon: true
type: button
tap_action:
  action: perform-action
  perform_action: switch.turn_on
  target:
    entity_id: switch.relay6
entity: switch.relay6
show_state: true
view_layout:
  position: sidebar

but that frontend button is a separate card. I could live with a horizontal stack of six of them, but I’d prefer to place them in a list of other entities in an entities card. Solved that one too with an input_button and this automation

alias: Raum-5-An
description: ""
trigger:
  - platform: state
    entity_id:
      - input_button.r5_an
condition: []
action:
  - action: switch.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: switch.relay1
mode: single

The problem here is, I lose the icon’s colour change for the “on” status. Is there any way to get this here too? If not, horizontal stack it is.

Solved it. Should have read the entities card documentation fully in the first place. There are types button and buttons. And I now see there is no need at all for an extra input_button helper.

Not quite solved after all. I have now tried all four permutations I could think of.

  - type: buttons
    entities:
      - entity: switch.relay1
        name: R5 Bad
        tap_action:
          action: perform-action
          perform_action: automation.trigger
          target:
            entity_id: automation.r5_an
          data:
            skip_condition: true
        icon: mdi:heating-coil
      - type: button
        entity: switch.relay1
        name: R5 Heizung
        show_name: true
        show_icon: true
        tap_action:
          action: perform-action
          perform_action: automation.trigger
          target:
            entity_id: automation.r5_an
          data:
            skip_condition: true
        icon: mdi:heating-coil
  - entity: switch.relay1
    type: button
    name: R5 Heizung
    show_name: true
    show_icon: true
    tap_action:
      action: perform-action
      perform_action: automation.trigger
      target:
        entity_id: automation.r5_an
      data:
        skip_condition: true
    icon: mdi:heating-coil
    state_color: true
  - type: button
    entity: switch.relay1
    name: R5 Bad
    show_name: true
    show_icon: true
    tap_action:
      action: perform-action
      perform_action: automation.trigger
      target:
        entity_id: automation.r5_an
      data:
        skip_condition: true
    icon: mdi:heating-coil
    state_color: true

As you see, the state colour is shown for “buttons” but not for “button”, which I would prefer. Also the “buttons” have a shaded background contrary to what the “entities” documentation shows. My template only changes active colours for the colourblind, nothing else.