[Solved] Automation seems not triggered

I have set this configuration

automation:
  trigger:
    platform: homeassistant
    event: start
  action:
  - service: shell_command.prep4out
  - service: notify.notify
    data:
      message: Outputs are ready

in the script.yaml there is

shell_command:
  prep4out: /var/lib/hass/custom_scripts/set_output.sh

$ ls -l /var/lib/hass/custom_scripts/set_output.sh
-rwxr--r-- 1 homeassistant homeassistant 129 Aug  1 01:44 /var/lib/hass/custom_scripts/set_output.sh

I can’t see the notification when I restart HA, nor the relevant shell command changing the outputs.
The check_config is OK.

Is the automation turned on (enabled) - check in States under Developer tools

Does the automation work if you force trigger it - select the icon next to it in the States menu

OK, I turned on the automation. Restarted HA…
The automation got triggered, but the shell_command gives an error

ERROR (MainThread) [homeassistant.components.shell_command] Error running command: `/var/lib/hass/custom_scripts/set_output.sh`, return code: 127

Ooops!


$ /var/lib/hass/custom_scripts/set_output.sh
/var/lib/hass/custom_scripts/set_output.sh: 3: /var/lib/hass/custom_scripts/set_output.sh: gpio: not found
/var/lib/hass/custom_scripts/set_output.sh: 3: /var/lib/hass/custom_scripts/set_output.sh: gpio: not found
/var/lib/hass/custom_scripts/set_output.sh: 3: /var/lib/hass/custom_scripts/set_output.sh: gpio: not found
/var/lib/hass/custom_scripts/set_output.sh: 3: /var/lib/hass/custom_scripts/set_output.sh: gpio: not found
/var/lib/hass/custom_scripts/set_output.sh: 6: /var/lib/hass/custom_scripts/set_output.sh: gpio: not found
/var/lib/hass/custom_scripts/set_output.sh: 6: /var/lib/hass/custom_scripts/set_output.sh: gpio: not found
/var/lib/hass/custom_scripts/set_output.sh: 6: /var/lib/hass/custom_scripts/set_output.sh: gpio: not found
/var/lib/hass/custom_scripts/set_output.sh: 6: /var/lib/hass/custom_scripts/set_output.sh: gpio: not found

Forgotten to setup the program :blush:

Final

I don’t receive the notification, but the script it working as expected.