To be fair I bought the switch on alliexpress, maybe this is not the best quality. But as I told you, its weird that I cant see the switch but the scenes are ok.
it worked I got my Lyasi lamp connected directly to hass now. Hopefully the newest pytuya will quickly be updated for home assistant so that anyone can more easily try it out! And maybe then it will be added into the home assistant components itself?
Another vote from me, I got a GU10 bulb from Zemismart (because Yeelight haven’t got any yet) and I would like to be able to control it without going through IFTTT.
Also since I’m using IFTTT I cannot easily have an ‘rgb bulb control’, I have to set separate actions for on, off, set brightness, set color etc…
I am the owner of the sean6541/tuya-homeassistant repository. I have started work on a new platform for controlling Tuya devices via the Tuya Cloud API. So far only switches are implemented. I am working on bulb support. See https://github.com/sean6541/tuyaha for the Home Assistant platform and https://tuyaapi.seandev.org for the Python library.
Wow this look amazing but I wasn’t able to make it work. I´m running hass.io on a raspberry, I add the files to the custom_components but wasn’t able to run the script.
Could you help with a step by step for beginners?
I copy the files to config/custom_componets (need to create the folder manually)
Then run python3 -m pip install tuyaapi without problem
But then I run python3 tuyasetup.py and i got:
core-ssh:/config# python3 tuyasetup.py
Traceback (most recent call last):
File "tuyasetup.py", line 1, in <module>
import tuyaapi
File "/usr/lib/python3.6/site-packages/tuyaapi/__init__.py", line 1, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
I´m running all of this in the same raspberry that I have the hass.io running.
After I got tuyasetup.py to run and went through the prompts, discovered that you must reset and connect to device AP mode. Hard to do on a hassbian image running headless on an ethernet connected rpi 2 w/o an adapter. I guess I’ll pop in an adapter and manually configure wifi during the script execution if I really want this. Glad I only have one power strip.
I have added the requests package as a dependency to the tuyaapi package. Grab a new copy of tuyaha from GitHub and install it to /custom_components. (The version of Python i am using comes with requests already installed.)