@Samuk I’ve been looking at how to run scripts on Hass -
The approached I used is -based on the hassio addon tutorial you posted above.
The first step is to connect to the hass device through a terminal. The terminal addon works, but I found it to be generally much quicker using ssh to connect (it responds more quickly). There doesen’t seem to be any difference between the two in terms of access to the device.
Once connected navigate to the addons folder
cd ../addons should do it.
Add a new folder for the add-on.
In the new folder create three files: config.json run.sh and Dockerfile
You can copy the dockerfile and config file from the tutorial. Change the name, slug and description in the json file to something appropriate. run.sh is the script you want to run. As far as I can tell it can be any arbitrary shell script.
To activate it in home assistant go to the hass.io tab, and from there to the add-on store. Click the refresh button in the top right- and the addon should appear under local addons. install and start it. The script should then be run, and subsequently run whenever the device is started.