I tried the debug and now gets this error but I don´t what to make of it.
[homeassistant.components.shell_command] Stderr of command: bash /home/homeassistant/.homeassistant/bash_scripts/synology_poweroff.sh, return code: 6:
b’Pseudo-terminal will not be allocated because stdin is not a terminal.\r\n’
Yes of course.
I had it working before but after a new install of HA it stopped. Maybe I miss something after installing HA. I have installed sshpass again.
This is the content of my bash script “synology_poweroff.sh”
Ok, well I don’t have any other suggestions. It appears that the command, and hence the script, is returning status code 6. And the command/script is writing that error message.
At this point I don’t think I can help any further. Either someone else will have an idea, or maybe you can do a bit more googling and see if you can find a suggestion that applies to your situation. BTW, have you tried running that script from whatever context HA is running in (docker, whatever)?
I think I got it.
I had to ssh into the Synology from HA shell as the user “homeassistant” to make the secure fingerprint and accept the NAS as a valid host. I did that with the user “pi” before and that didn´t work
Now it runs.
Thanks for helping