#shell_command not found

1 messages · Page 1 of 1 (latest)

acoustic crystal
#

Home Assistant on Raspberry Pi
Core: 2024.11.3
Supervisor: 2024.12.0
Operating System: 13.2
Frontend 20241106.2


I'm trying to trigger a shell command on button click. for some reason, my home assistant instance does not seem to have the shell_command integration, or I'm just completely lost.. maybe both

configuration.yaml

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

shell_commands:
  update_url: ./config/script/update_url.sh

attempted automation

alias: Refresh URL
description: ""
triggers:
  - trigger: state
    entity_id:
      - input_button.refresh_url
actions:
  - action: shell_command.update_url
mode: single

Every time i try to save the automation, i get these errors

Automation error:
The automation "Refresh URL" (automation.refresh_url) has an unknown action: shell_command.update_url.
---
Trace Timeline error
Stopped because an error was encountered at December 25, 2024 9:00:00 PM (runtime: 0.00 seconds)
Action shell_command.update_url not found
blazing ridge
#

It's shell_command:

#

And you should remove the leading . from the command

#

./config doesn't exist

acoustic crystal
#

so shell_command: /bin/bash /config/script/update_url.sh?

blazing ridge
#

Probably

acoustic crystal
#

Doesn't it need a "name" for it to be found as an action?

blazing ridge
#

You gave it one

acoustic crystal
#

or did you mean

shell_command:
  update_url: ...
blazing ridge
#

Yes

acoustic crystal
#

I'll give it a go then

blazing ridge
#

You had an 's' on the end

acoustic crystal
#

should i be able to find it under actions in the web-ui?

blazing ridge
#

Yes

acoustic crystal
#

let's hope this works, because so far there was nothing along the lines of shell_command anywhere

blazing ridge
#

Did you check your config and restart HA?

acoustic crystal
#

multiple times, now with shell_command