How are you running HA? HA OS, Supervised install, docker, venv etc? The correct path to your script will vary depending on the answer.
If running in a venv, the path is likely
Sorry, of course I should have mentioned that: HA is running in Docker with Docker Compose.
The config folder is “/home/homeassistant”. There are also the yaml-files and the db-file.
@tjntomas
You set me on the right track.
With docker the standard folders like /usr/bin/ are not accesible.
I give myself a shell in the homeassistant docker with: docker exec -it homeassistant /bin/bash
I then figured out that this shell starts in de config-folder of homeassistant
So the comandline should be: python3 python_scripts/test.py
And that worked fine!!