Camera.snapshot under /tmp doesn't work

When I execute the “camera.snapshot” service with the following path:

action:
  service: camera.snapshot
  data:
    entity_id: camera.eingang_eg
    filename: '/tmp/eingang_eg.jpg'

no file is written to the /tmp directory, although I added the following statement to my config:

  whitelist_external_dirs:
    - /tmp

Also, there is no error message indicating any error.

When I try it under “/config/www/” it works fine!

action:
  service: camera.snapshot
  data:
    entity_id: camera.eingang_eg
    filename: '/config/www/eingang_eg.jpg'

I am using Home Assistant OS with Home Assistant 0.112.4.

The directory rights are:

drwxr-xr-x   19 root     root          4096 Jul 18 09:07 config
drwxrwxrwt    1 root     root          4096 Jul 10 07:52 tmp

Any idea what’s wrong?

Thanks and regards,
Daniel.

If you’re SSHing on to look in /tmp then you’ll never find it :wink:

Your install method uses Docker. Home Assistant is one container, with its own /tmp. The SSH add-on is another container, with an entirely different /tmp.

Ohh … ok, thanks! It didn’t recognized that.

Is there any way to “look” (ssh) to this container dir?

Yes, but it’s not trivial (deliberately). You’re better off using a folder under /config.

Ok, thanks!