How to install Github python code

I am very new to HASS (3 days) and I am trying to install an addon to control my Tempurpedic bed. I located a project on Github created by Doug Wyman several years ago but there are no installation instructions that I can find. I have obtained the code and have it on the HASS computer but cannot figure out how to make the functions available to HASS. I have run the code with Python debug and it works fine. I want to make the functions available to use with automations, I have 20 years of HomeSeer experience and wrote .vb code to control the bed in Homeseer and could just call the routine from the event (automation). Help please.

Maybe give a link to the code?

You could use shell commands to invoke the python scripts.

I have not been able to determine how to invoke a python script from an automation. (i.e. “When the time is 9:30 pm Then run script”)

Make sure the python scripts are in some subdirectory of /config, then in your configuration.yaml, add something like:

  bedset1: python3 /config/YOUR_SUBDIR/

Then restart Home Assistant. When it starts back up, you will have a service called shell_script.bedset1 that you can invoke from automations.

Thank you, I will give that a try.

That works fine. I entered all of the python bed control scripts and created a service for each. Again, thank you for your help. This is a new environment for me.