#!/bin/sh # execute the command multiple times based on command line argument for i in $(seq 1 $1); do python /home/openhabian/addons/BlackBeanControl/BlackBeanControl.py -c LG_TV_V$ done
I put my scripts in the /etc/openhab2/scripts folder.
You will need to create a thing/item combination that uses the Exec binding as I've done here.
To test the command is working as expected use the command:
bash /etc/openhab2/scripts/tv_lounge_volume_down.sh 5
If everything went well you should see your command executed 5 times. Pair this with my instructions on connecting openHAB with the Google Home Assistant and you should be set.
For reference this is what my applet looks like at the command end.