Hassio and python script

Hello. I made a small circuit that controls the speed of a fan that cools the CPU of the raspberry on which I installed Hassio. The circuit is governed by a Python script. Which is the most effective way to integrate this functionality into Hassio? Thanks

Shell Command:

shell_command:
  removealarm: python /config/emptyinbox.py

You can then call with an automation or a button in lovelace

Hi. Thank you for your suggestion. I will try