sbidy / wiz_light

A WiZ Light integration for Home Assistant
MIT License
341 stars 68 forks source link

Configuration Trouble. #43

Closed Penguin-Guru closed 4 years ago

Penguin-Guru commented 4 years ago

Hi, I've never used HA before and am probably doing something wrong.

I set up HA following these instructions: https://www.home-assistant.io/getting-started/

Then followed your instructions to install for testing.

After restarting the HA service, there is a notification "Config validating". I went to server_control and used the button to validate. It prints one of these lines for each bulb I attempted to configure:

Platform error light.wiz_light - No module named 'pywizlight'

Did I perhaps create custom_components in the wrong location? I've tried / and /root

chrisbl01 commented 4 years ago

The custom_components dir should be created in /config or where the configuration.yaml file is located.

I'm pretty new to HA as well, if you have the supervisor in the sidebar it's worth installing "file editor" from add-ons.

Penguin-Guru commented 4 years ago

Installing it there seems to produce the same effect. I just noticed "requirements.txt". Should I install pywizlight separately? Their instructions say to use pip, but I can't find pip installed or available as an add-on.

sbidy commented 4 years ago

Please have look into the HA documentation for custom components for install this. This integration is currently not pushed to the HA core. If you have installed/copied the component to the folder you have to restart the HA instance because the pywizlight package hast to be installed first. Please have also a look into the log at the startup.

Penguin-Guru commented 4 years ago

I managed to fix the problem but I'm not entirely clear on how. I couldn't find the documentation you suggested so I asked about it in HA's Discord channel. They told me to install HACS, which probably worked but I was confused about something and can't say for sure. In any case, I repeatedly deleted both installation directories and reinstalled one or the other, restarting between installs, uninstalls, or both. After a few times the problem was resolved (without actually using HACS). May or may not be related to adding HACS to the Integrations panel (and not using it at all) or commenting out all wiz_light lines in configuration.yaml, restarting, uncommenting them, then restarting again. Sorry if this seems like nonsense but that's really all I did. Also, I suppose, clearing the log and notifications several times. Anyway, it seems to be working well now. Maybe there was some glitch because I just installed HA for the first time on new hardware.

sbidy commented 4 years ago

Sometimes HA doesn't recognize the customer component correctly and miss the pip package in the manifest file. That why it is necessary to restart the HA server after copying the custom component.

In the future this integration is part of the HA core (hopefully).