Command line switch "command failed" everytime

Hi @augerl, on which OS runs your HA?

If HA runs in a virtualenv, you should test your script/command on the command line as HA user when venv is activated.
For Hassbian:

sudo su -s /bin/bash homeassistant
source /srv/homeassistant/bin/activate

There are several problems with the $PATH variable in the venv, so HA cannot find the commands.
Run your commands with the full path, so insteed of echo try /bin/echo for the command_on: statement and in the scripts.
You can get the full path with which echo as normal user without the venv.

If your script is executable (chmod a+x), you don’t need bash /path/to/script.sh , its enough when you type /path/to/script.sh , but i would always type the full path to the script.

That`s all i can say to command_line problems in HA at the moment…