The python code I used is in the link in the first post. The code change I made is in my last post as a pseudo-diff. Put the python file /config/custom_components/switch/
Understand that this code is just making calls to the VeSync servers, so it’s not controlling the switches directly. It seems to be working well for me so far.
So I have tried to get this to work. I installed vesync 1.0.1 and added the vesync.py file to my custom_component\switch and modified the device: part. added in
switch:
platform: vesync
username: !secret dfd
password: !secret dff
it keeps saying
ERROR (MainThread) [homeassistant.loader] Unable to find component switch.vesync
Shouldn’t I also have to add "host: theVesyncSwitchIP in there?
This is the error I get.
ERROR:
2018-02-10 15:00:43 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform vesync Traceback (most recent call last): File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py”, line 189, in _async_setup_platform SLOW_SETUP_MAX_WAIT, loop=self.hass.loop) File “/usr/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for return fut.result() File “/usr/lib/python3.6/asyncio/futures.py”, line 245, in result raise self._exception File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run result = self.fn(*self.args, **self.kwargs) File “/config/custom_components/switch/vesync.py”, line 30, in setup_platform from vesync.api import VesyncApi ModuleNotFoundError: No module named ‘vesync’
Ok guys so I’m a little newer to this than you guys. So i added a custom_components folder to within my hassio config folder and added the vesync.py file with the devices change. I added the config.yaml code as well. Am I doing this right? Also i can’t get my config to validate, I"m getting a mapping value are not allowed here error. Heres my yaml code https://www.hastebin.com/tohepijewo.go THanks!
Can you access the VeSync app on your phone and control/see them?
I have exactly the same entry as you in my switch.yaml file. It detects my 2 switches and I don’t need to add in the ip address or anything. It wasn’t working for me until I verified the password as I had that wrong, thus I went back to the VeSync app to confirm it was working.
If you have that 1 line edit to the vesync.py and it looks like it is in the correct directory…hmm… not sure, perhaps a hard reboot and then check your logs.