Hi all,
I’m trying to run a python script in HA, I created the folder in my repository and insert the code in cofiguration.yaml (python_script:).
If I run the script with “thonny, Python IDE” it run with no problems.
In HA I found the service “python_script.campanello2” but if I click “call service” nothing happens…
This is the LOG:
Error executing script: __import__ not found
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/python_script/__init__.py", line 217, in execute
exec(compiled.code, restricted_globals)
File "campanello2.py", line 1, in <module>
ImportError: __import__ not found
2 posts - 2 participants