I wish to use the new python_script component in 0.47.0 to post an image by MQTT. I am getting an error when in my hello_world.py script I include:
import paho.mqtt.client as mqtt
In my log:
2017-06-20 04:37:20 ERROR (Thread-3) [homeassistant.components.python_script.hello_world.py] Error executing script: __import__ not found
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/python_script.py", line 106, in execute
exec(compiled.code, restricted_globals, local)
File "hello_world.py", line 5, in <module>
ImportError: __import__ not found
I presume I need to pass the MQTT object to the script somehow, rather than importing?