Tuya Integration

Hi Everyone, Just to follow up on my earlier comment … I guess having quotes around the country code was not required (as VarenDerpsAround and tdrev mentioned). I just removed the quotes, rebooted and all the devices are still showing on my home screen. It seems like it works both ways.

tuya:
  username: [email protected]
  password: xxxxxx
  country_code: 1
  platform: tuya

some other notes…

  • (per my comment on 12/5) I was having trouble before getting it to show up and I thought adding quotes was the last thing I did but maybe that was not the case.
  • I use it with HASSIO running 0.103.0 to control two of the “SENDOW Wifi Surge Protector” each with 4 outlets.
  • After MUCH struggle, I could never get the smart_life to work. I tried all kinds of combinations.
  • The smart life (from before is switched to Tuya) has been very reliable. I have been using it for about a year. I never had any issues with it and so far Tuya has been good also.

Hi guys,

I have been using Tuya devices (they are cheap and ubiquitous). All of them integrate great with Google Home, but not all of them work with Home Assistant. The strip lights, the smart christmas lights, and the smart fan all appear in HA - however, none of my smart plug / outlets do. They are ALDI Medion ones - they appear in the Tuya Smart app and are controllable via Google Home just like the other devices, but they are not recognized by HA.

My configuration is as following:

tuya:
  username: [email protected]
  password: password
  country_code: 61

Does anyone have any idea on how to get these plugs working? :frowning:

Many thanks,
David

if you have the integration working for other devices, it is likely that the plugs are not supported.

(especially if multisocket).

worked for me too, thanks

Had this problem too where my device was in tuya and worked fine in google/alexa but not HA so I went away from tuya firmware and flashed tasmota using this method.

Make sure you update to the lastest Tasmota after the first OTA

if new to tasmota this video helps you work out your custom template if one is not already templated.

already known templates here

Now all my devices (bar 1) run Tasmota, hope this helps

Hi Guys,

Another Aussie here having the same issue.
I an very new to Home Assistant and may be doing things very wrong so please feel free to correct me.
I have my code in the configuration.yaml set up as follows.

tuya:
username: My_Phone_Number
password: My_Password
country_code: 61

I then have tried restarting hass and powering off the whole machine
to see if devices show up.
nothing shows up in integrations but i figure it wont? and nothing shows in devices nor do they show in the lights panel on the main screen.
However Weird thing is if i go into the logbook i can see my “laundry Light” if i select it from the logs i can then control it.

just a little more background, most of my lights are from a company called Brilliant, i also have smart plugs by the same company. all these devices were added via the brilliant app. i have moved one of my lights to the tuya app for testing purposes “in which the two apps are identical”

am i doing something wrong?

Please Help.

Hello 4Sakyen and welcome to the forum. Correct formatting is very important in the “configuration.yaml” file. Please make sure when formatting here in the forum that the formatting is also successful!
for example…

tuya:
  username: !secret tuya_user
  password: !secret tuya_password
  country_code: 49

After saving the file, always check whether the configuration is OK and then restart! With the integration that you show here, only the devices that are set up in the “Tuya app” are shown in HA.

With this icon you can insert a formatted text …

Any way to add 2 different accounts ?

I have switches in both Smart Life and Tuya app and was having connection issues in node red so I had to split my switches over 2 different accounts in order to get it to work .

Tried adding both accounts and no errors in config but only the switches on the first one get added .

nope - afaik the default integration supports only a single instance.

Under Lovelace nothing will show by default unless you add it. And tuya integration doesn’t show in configuration->integrations or configuration->devices.

BUT it does show in configuration → entities (search for tuya). Given the device shows in logbook, it should show there.

SO you just need to add it to a lovelace screen (edit UI, add something like Entities card, and then add the devices there).

Tuya provide a dev kit for suppliers to create hardware that integrate to servers provided by Tuya. They can then whitebox the app if they wish. You should be able to add everything to the Tuya app, but not everything will necessarily be available via the HA Tuya integration (as it doesn’t support all Tuya devices)

A few weeks ago I bought some Tuya lights and integrated them into Home Assistant. It was all working just fine. Now a few weeks later it stopped working. I can turn on the light with the switch in HA, but HA still thinks the light is off. It’s like HA isn’t getting feedback of the state of the lights.

Does anyone have this problem as well or know how to solve it?
The light work totally fine in the Tuya app itself.

Anybody know why they chose to use brightness_pct for the brightness slot in the Tuya Light integration…? You can’t even set regular brightness on Tuya Lights because it points to the ATTR_BRIGHTNESS_PCT in the code… at least from what I’m seeing…

So Lovelace sends 0 to 255 so it doesn’t update if you send a brightness above 100.

I have been trying for almost half a year to integrate tuya, by standard integration, tuyaha and tuya custom components, reading countless threads on the forum, Reddit and Google. Using custom components yields nothing but a warning in the log. All three options only yield user authentication errors. I am positive my credentials are correct.

Apart from flashing the devices, what else than tossing the devices do I have as an option?

I am facing a similar issue. I have a smart power strip, which works on Tuya and/or SmartLife Apps, but does not do either of these -

  1. Does not work with Tuya Convert
  2. Does not appear in HA. Here is my snippet of the config.yaml
tuya:
  username: !secret tuya_username
  password: !secret tuya_password
  country_code: !secret tuya_countrycode
  platform: smart_life

this happened late last year when Tuya changed part of the API. I’m not seeing an issue here (on 0.102.3). Do you have a slow/busy internet connection?

what device? Do you know if others have them working successfully?

pretty sure this isn’t supported by the tuya/HA integration

Solved it. As per usual the documentation was incomplete. When using phone number for username one has to leave out the countrycode and dash. Only spent 3 months researching…

1 Like

Hi all,

Someone has tried with tuya curtain switch integration? there is a very cheap switches in aliexpress but I’m not sure if there is integrated I only can see normal switches.

curtain switch

Hello,
Did you have your response?
I have the same issue.