Add Support for Smart Life Components

I tried from pc and app Android and nothing. Are you using IOS app?


image

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.

Hopefully someone can help

it worked :smiley: 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?

Sorry for the late reply, but I am using android with Smart Life app version 2.9.9.

Hope this helps.

Scott

I would love to use these. Are only 10 dollars!, Small, monitor, these seems like too good to be true. They work with the Smart Life app.

That’s interesting. I have virtually the same setup but in relation to your example excerpt:

event: ‘raspi_switch_off’
value1: ‘off’

I had to make mine:

event: ‘raspi_switch_off’
value1: ‘on’

Otherwise, IFTTT webhook would not execute.

Added another vote. Direct and easy control without IFTTT would be great.

Another vote also From me. Got 3 light bulb I like to add to home assistant.

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?

Thanks for the great work

Run python -m pip install tuyaapi before running tuyasetup.py.

I have added a quick start guide for tuyaha to the repository. See https://github.com/sean6541/tuyaha/blob/master/INSTALL.md

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.

Thanks for all the help and great work

components NOT componets

Sorry, my bad when posting, i´m using /config/custom_components.

thanks for the help

I have the same issue

Had the same issue. Requests package not installed. Run python3 -m pip install requests.

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.)

You can run the tuyasetup.py script on any computer with Python 3.4 and above. You don’t have to use Home Assistant.

I have also just created a Windows program to setup Tuya devices for use with tuyaapi and Home Assistant. That can be found here: x86 x64