Command_line integration not working as expected


I am trying to use a switch created through the command_line integration in my automation but I always get the return code 127 on its execution. I have home assistant running in a docker container. Please see the attached image.

I also want to point out that I was able to use the CPU temperature sensor through the command line integration described in their documentation. Since some things work and some doesn’t, I am pretty sure that something is wrong in the way I’m trying to use the switch. I would really appreciate some help here.

Please let me know if you need any additional info.

Unless you run HA Core, you don’t have a /home/nmjain.
Your scripts should reside under /config

@koying , thanks for the quick reply. I forgot that the commands will be run from within the docker container. Fixed the issue now.