Command line switch does nothing

If you run a command, the linux shell looks in different directories for it.
These directories are listed in the $PATH variable.

server:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

I assume that the vrtualenv where your HA runs in, has a problem with this $PATH variable, so it can’t find irsend.

If you run the command with the full path, HA will find it.