cyberjunky / home-assistant-custom-components

My custom components for Home Assistant
MIT License
71 stars 19 forks source link

ModuleNotFoundError: No module named 'homeassistant.components.plugwise.switch' #46

Closed doets001 closed 4 years ago

doets001 commented 4 years ago

I can't get it working. The module seems to load, but I can't configure HA to see my circles. 1) de module seems to load 2020-02-09 18:07:10 INFO (SyncWorker_12) [homeassistant.loader] Loaded plugwise from homeassistant.components.plugwise

2) I did put the file on the location you metioned on git config # find custom-components/ custom-components/ custom-components/plugwise custom-components/plugwise/switch.py custom-components/plugwise/init.py custom-components/plugwise/manifest.json

3) The configuration in the configuration.yaml ... ... switch:

4) the error in the logging ... ... 2020-02-09 18:13:27 INFO (MainThread) [homeassistant.setup] Setup of domain binary_sensor took 0.0 seconds. 2020-02-09 18:13:27 ERROR (MainThread) [homeassistant.config] Platform error: switch Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config.py", line 760, in async_process_component_config platform = p_integration.get_platform(domain) File "/usr/src/homeassistant/homeassistant/loader.py", line 265, in get_platform f"{self.pkg_path}.{platform_name}" File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 965, in _find_and_load_unlocked ModuleNotFoundError: No module named 'homeassistant.components.plugwise.switch' 2020-02-09 18:13:27 INFO (MainThread) [homeassistant.setup] Setting up switch ... ...

And some general info:

arch x86_64
dev false
docker true
hassio false
os_name Linux
python_version 3.7.6
timezone UTC
version 0.104.3
virtualenv false

What I'm doing wrong? Can you please help me? The switch configured for the rfxtrx is working fine.

cyberjunky commented 4 years ago

Hi,

the directory custom-components should be called custom_components

doets001 commented 4 years ago

Thnx! Stupid mistake :-). It works now!