theneweinstein / somneo

Home Assistant custom component for Philips Someo
33 stars 18 forks source link

Errors after update to HA 0.117.6 #5

Closed Listad79 closed 3 years ago

Listad79 commented 3 years ago

Hello, after updating HA to 0.117.6, I noticed the following lines in the log files. I am not 100% sure that I am doing something wrong, but it worked with the same configuration earlier, so I decided to post the log here.

2020-11-13 00:58:07 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.philips_somneo. Make sure all dependencies are installed
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 539, in _load_file
module = importlib.import_module(path)
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/config/custom_components/philips_somneo/__init__.py", line 15, in <module>
from pysomneo import Somneo
ModuleNotFoundError: No module named 'pysomneo'

My mistake, had to rename the folder to "somneo".

jacobstim commented 3 years ago

I had the same problem, even with the folder being named "somneo". After adding to the top of the __init.py file the line "import pysomneo", this dependency was correctly installed and the integration started normally.

Possibly a structural fix is the addition of a requirements.txt like done in this fork. Not tested & not enough experience with writing HA plugins to verify that this works too.