Is there a way to make an equivalent of groups for buttons?

I have a large number of identical ESPHome-based devices that need a button action done on all of them with a single click in HA. That’s easily done with a group when using switches, but this action isn’t on/off, it’s a trigger so a button would be more appropriate… but for some reason HA doesn’t support grouping buttons.

Is there a workaround I’m not thinking of?
Ideally it’d be possible to set it up in yaml, since manually selecting the large number of devices in the UI is impractical.

Do you mean the UI group helper? If so, create a legacy group in YAML.

Doesn’t work in yaml either, you just get an error that “group” isn’t valid for button entities.
Which makes sense cause it’s not one of those that support it, which is kinda stupid…

Unless I’m not understanding what the “legacy group” is…

EDIT: Yup got it, from an example here Please help with Groups.yaml

This is a legacy group (aka ‘old style group’):


group:
  my_group:
    name: My Group
    icon: mdi:heart
    entities:
      - entity_id_1
      - entity_id_2

Yep been able to add it but it seems it will only report a grouped state, not do an action on the members…

Trying an automation but I can’t choose it in Service: Press Button

OK I just need to forget about the group, an automation works just that each entity has to be selected, but by manually adding it in the yaml I can easily generate the list of my many devices and paste it in.

- id: 'fw_all_update'
  alias: Update all Firmware
  description: ''
  trigger:
  - platform: state
    entity_id:
    - input_button.update_firmware
  condition: []
  action:
  - service: button.press
    data: {}
    target:
      entity_id:
      - button.firmware_update
      - button.firmware_update_2
      - button.firmware_update_3
      - button.firmware_update_4
      - button.firmware_update_5
      - button.firmware_update_6
      - button.firmware_update_7
  mode: single

Time to note how much I dislike the change of the device name not being part of the entity name anymore BTW…