Command octoprint from Hassio

Hello

I am trying to find a way to control octoprint from Hassio.

Here is the idea.
I want Home assistant to send a command to Octoprint to go to a specific XYZ position once the print is finished.
Then Hassio can startup an automatic print remover system (a machine pushing the prints off the bed), and then ask Octoprint to set everything to home again.
The only thing I managed to far is to get the percentage sensor of the Octoprint to trigger stuff within Hassio but not Hassio to command Octoprint.

For info both Hassio and Octoprint are on 2 different pi’s.

Is there any ways to get Hassio to send XYZ positions commands to octoprint?

PS: I am not really good at coding but will try my best

Hi,
you can add a position in the GCODE Endscript in your slicer.
Octoprint has a REST api to control your printer.
http://docs.octoprint.org/en/master/api/index.html

But I dont think Home Assistant is the right tool for this.