Connecting my PiKVM Power Button to Home Assistant

This is mostly a note to myself if I ever want to figure out how I did this.

  1. Edit configuration.yaml. I added a shell service:

    shell_command:
       pikvm_power: "curl -X POST -k -u admin:super_secret_password https://pikvm-ip/api/atx/click?button=power"
  2. Reboot HA; needed for the shell_command.pikvm_power service to appear.

  3. Add a button helper

  4. Add an automation that calls the service when the helper button is pressed.

Success!