Publishing command lines in the UI

I have a printer that locks up occasionally and needs a power recycle as the physical interface also locks up.
The web interface is still up and I’ve figured out the cURL command to issue a reset, this works fine.

I’m looking for guidance for the best wat to publish the cURL command in HA.

  • This is a manual task run on demand.
  • I’d like to associate it with a button card and publish it via Lovelace.
  • Optional - Publish this via HA cloud to Alexa.

Thanks.

Have you integrate it with this?

If you have done that, to put it nicely on Lovelace, you can use-

I looked at the switch but it requires an ‘On’ and ‘Off’.
This is a single reset command, does that matter?

Edit: use koying’s suggestion.

Why a command line?
If it can be done with curl, it can likely be done with a REST command

Thanks.
The REST command is a bit beyond my skill level but it did point me in the right direction.
I’ve created a shell command called from a script which is working, I’ll plug away at the REST command docs and see if I can migrate it later.