Shell_command dont appear in the services

Hello everyone,

Im setting up Home Assistant slowly, already got my lights and switches running :slight_smile:

Now I want to setup some shell_commands, but they do not appear. My config.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_command:
  test_direct: ls

</>

I tried several methods, i put “” around ls, used shell_command: !include shell_commands.yaml with a seperate file… nothing works. The only signal i get from HA is that the “shell_command” logo appears in the Services page, but its empty and cannot be configured from WebUI.
Logs clean

I want to automate a music playback (Raspi/Libreelec squeezelite). I need to have the raspi start the squeezelite by himself to get the player available.
I want to have a shell_command to ssh into the pi and start the squeezelite, and then automate the playback with the rest of HA integrations

Can anyone help me ?
Cheers

When posting code make sure to mark it as code with th </> icon above the editor (sometimes it is in the double down arrow).

Besides that remember to restart HA core after changes to the configuration.yanl file or files included therein.

1 Like

Sorry for the code.

I restarted the container and also restarted home assistant itself several times, didnt change…

I do not know what the issue might be, but your test might be flawed, because the ls command might be executed in your home directory, which have no files (except maybe a few hidden ones).