Create button entity

Hi, is it possible to create a button entity from configuration.yaml that calls this service with service_data?
I know it is possible to do it via a script, but is it possible to do it directly by creating a new entity?

button:
  - platform: template
    buttons:
      reboot_router:
        name: "Router Restart"
        icon: mdi:restart
        service: ssh_command.exec_command
        service_data:
          command: reboot
          host: 192.168.1.1
          port: 22
          user: root
          pass: pass

Thanks

Template Buttons can be created directly in YAML or UI through the Helper menu under the “Template” section.

What you have posted looks kind of like the legacy configuration format which is no longer supported for Template Buttons, use the current format linked above.

If you are adventurous check out

Ok thank you. I used a Helper to create the button. Is there a way to see the yaml code of the created button? Where are Helpers stored?

Helpers are not stored as YAML, and the storage file they are placed in is not intended to be edited by the user.