Shell_command doesn't work?

Added to my configuration.yaml:

  shell_command:
    test: ls /media/snapshots

When running the command in Developer Tools - Actions, I get a response of:

  stdout: ""
  stderr: ""
  returncode: 0

I would expect to see my snapshots in there. From the terminal tool:

  [core-ssh config]$ ls /media/snapshots
    back-gate-person.jpg   doorbell-visitor.jpg   driveway-overhead.jpg  garage-gear.jpg        hvac-room.jpg
    back-gate.jpg          doorbell.jpg           driveway-track.jpg     garage-overhead.jpg    side-gate.jpg

Manyvget confused by the container setup used in HA.
HA is based on Docker containers and each container have its own environment with files and paths and so on.
Your terminal is running in one container and HA is running in another.
Some folders might be shar d among containers, but the path to the share might differ from container to container.

Start your test with just ls / to be sure to get an output with some text.

I just tried this now, and I still get the same response:

configuration.yaml:

shell_command:
  test: ls /

Response in Developer Tools - Actions:

stdout: ""
stderr: ""
returncode: 0

Did you read the documentation?

Especially the note sections