Yes, but it doesn’t tell me anything about that.
Can I run the script by terminal? because when I run, it tells me:
pi@raspberrypi:/home/homeassistant/.homeassistant/python_scripts $ python3 hello_world.py
Traceback (most recent call last):
File “hello_world.py”, line 1, in
name = data.get(‘name’, ‘world’)
NameError: name ‘data’ is not defined
Hallo @Danielhiversen,
I tried the same script as @Matteo_Lando. I put the script into root/homeassistant/python_scripts
(I don’t know why the docker container was installed in root)
In the services I tried to call python_script.hello_world and got an error that the script cannot be called.
So I tried in the Terminal: /root/homeassistant/python_scripts $ python3 hello_world.py
and got -bash: /root/homeassistant/python_scripts: Permission denied
Also I copied the scripts intp PATH_TO_YOUR_CONFIG tried to start the command in the Terminal because I found it in the / structure (edited also the configuration.yaml like discribed below): /PATH_TO_YOUR_CONFIG/python_scripts $ python3 hello_world.py
but I got -bash: /PATH_TO_YOUR_CONFIG/python_scripts: Is a directory
Further more I didn’t get a error log.
The configuration.yaml were edit
python_script:
logger:
default: info
logs:
homeassistant.components.yamaha: critical
custom_components.my_integration: critical
Could you give me a hint pls what I’m doing wrong?
Logs are found in the home assistant logs. The hello world script example outputs to the logs. So browse to your configuration folder and look at the home-assistant.log file.