Hello, I am trying to use the python scripts of home assistant from my hassbian but I am stuck into the following problem:
I have a python program that can turn on/off a bluetooth bulb (CHSmart Bulb). When I run it as stand alone it works, so now I wanted to implement it in my Home Assistant as python script. The problem is that I need to import the bluetooth python module in order to connect and control the bulb, and apparently the import is not supported by python scripts, as I get the following error:
2019-08-08 14:53:42 ERROR (SyncWorker_0) [homeassistant.components.python_script.test.py] Error executing script: __import__ not found
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/python_script/__init__.py", line 182, in execute
exec(compiled.code, restricted_globals, local)
File "test.py", line 1, in <module>
ImportError: __import__ not found
What do I do wrong? And how can I control the bulb then?
Thank you in advance