Pressing input_button or running script as buttons on dashboard don't work

I have an input_button that runs a script. Both work fine. But I would like to save dashboard real estate by having a simple button to tap. After a careful reading of the documentation and all relevant posts from this community that I could find I figured one of these would work. Why don’t they? What am I missing? Appreciate any help. Thanks.

type: entities
entities:
  - type: buttons
    entities:
      - entity: input_button.wake_study
        name: Wake Study
        tap_action: perform_action
        perform_action: input_button.press
      - entity: script.ready_study_script
        name: Wake Study
        tap_action: perform_action
        perform_action: script.turn_on
        data: {}

The syntax is incorrect. See below for correct syntax, noting that the action is perform-action (dash) and the yaml key is perform_action.

tap_action:
  action: perform-action
  perform_action: script.turn_on
  data:
    ...

Good catch on the underscore needing to be a dash. Thanks.

Unfortunately it still doesn’t work. :disappointed:

Post your current card config… there’s not much we can diagnose otherwise.

The config you posted previously is using two action that require targets, but you aren’t providing targets.

There are at least 6 ways the dashboard button could be configured depending on whether your goal is to “press” the button or fire the script. Here are 3 options:

Press the Input Button
type: entities
entities:
  - type: buttons
    entities:
      - entity: script.ready_study_script
        name: Wake Study
        tap_action:
          action: perform-action
          perform_action: input_button.press
          target:
            entity_id: input_button.wake_study
Call the script directly
type: entities
entities:
  - type: buttons
    entities:
      - entity: script.ready_study_script
        name: Wake Study
        tap_action:
          action: perform-action
          perform_action: script.ready_study_script
Call the script indirectly
type: entities
entities:
  - type: buttons
    entities:
      - entity: script.ready_study_script
        name: Wake Study
        tap_action:
          action: perform-action
          perform_action: script.turn_on
          target:
            entity_id: script.ready_study_script

The entity ID you use in the entity field will determine what happens by default when the dashboard button is held.

Fair enough. The last test I conducted was to follow dscapstock’s suggestion for the second button - to run the script “indirectly”:

type: entities
entities:
  - type: buttons
    entities:
      - entity: script.ready_study_script
        name: Wake Study
        tap_action:
          action: perform-action
          perform_action: script.turn_on
          data: {}

Then I tested your suggesttions and they all worked!

Thank you!