Help with Hassio, Python and Command Line Switch

Hi, I am a new user to Home Assistant and Hassio and am having a bit of trouble. I found this python script https://github.com/genesisfactor/DreamScreenCommander I am able to run from the command prompt on my raspberry pi, but I cannot figure out how to integrate this into switches or scripts in Home Assistant.

I am also finding that every time I restart Home Assistant I need to re-install python2 with the command apk add --no-cache python2 before I am able to use python to run this command.

So I have two questions:

  1. Is there a way I can have python2 auto installed on boot up or another way to have it stay around after a reboot?

  2. How would I go about running this python program with a command line switch or some other way accessible in home assistant front end?

  1. not really sure

  2. start here and then see if you have any other questions:

realize tho that this command will not be shown as an entity or be directly available on the frontend. all it does is exposes a service that allows the command to be called.

to run it from the frontend you have to create an automation, script or switch to call the command.

Maybe you want to look into a different HomeAssistant setup - from what I understand, Hassio is not really intended to cater for thisngs like you’re describing here, i.e. running some pieces e.g. under Python2.

Take a look here:
https://www.home-assistant.io/docs/installation/hassbian/installation/

Maybe there is a wat that suits your setup better.