The Tuya integration integrates all Powered by Tuya devices you have added to the Tuya Smart and Tuya Smart Life apps.
All Home Assistant platforms are supported by the Tuya integration, except the lock and remote platform.
Configuration of the Tuya IoT Platform
- Your devices need first to be added in the Tuya Smart or Smart Life app.
- You will also need to create an account in the Tuya IoT Platform. This is a separate account from the one you made for the app. You cannot log in with your app’s credentials.
Create a project
- Log in to the Tuya IoT Platform.
- In the left navigation bar, click
- On the page that appears, click
Create Cloud Project.
- In the
Create Cloud Projectdialog box, configure
Data Center. For the
Development Methodfield, select
Smart Homefrom the dropdown list. For the
Data Centerfield, select the zone you are located in. Refer to the country/data center mapping list here to choose the right data center for the country you are in.
Createto continue with the project configuration.
- In Configuration Wizard, make sure you add
Device Status NotificationAPI. The list of API should look like this:
Link devices by app account
- Navigate to the
Link Tuya App Account>
Add App Account.
- Scan the QR code that appears using the
Tuya Smartapp or
Smart Lifeapp using the ‘Me’ section of the app.
Confirmin the app.
- To confirm that everything worked, navigate to the
All Devicestab. Here you should be able to find the devices from the app.
- If zero devices are imported, try changing the DataCenter and check the account used is the “Home Owner”. You can change DataCenter by clicking the Cloud icon on the left menu, then clicking the Edit link in the Operation column for your newly created project. You can change DataCenter in the popup window.
Get authorization key
Click the created project to enter the
Project Overview page and get the
Authorization Key. You will need these for setting up the integration. in the next step.
Adding Tuya to your Home Assistant instance can be done via the user interface, by using this My button:
Tuya can be auto-discovered by Home Assistant. If an instance was found, it will be shown as Discovered. You can then set it up right away.
If it wasn’t discovered automatically, don’t worry! You can set up a manual integration entry:
Browse to your Home Assistant instance.
In the sidebar, select Settings.
From the configuration menu, select Devices & Services.
In the bottom right, select the Add Integration button.
From the list, search and select Tuya.
Follow the instructions on screen to complete the setup.
Go to your cloud project on Tuya IoT Platform. Find the Access ID under Authorization Key on the Project Overview tab.
Go to your cloud project on Tuya IoT Platform. Find the Access Secret under Authorization Key on the Project Overview tab.
Error codes and troubleshooting
- First, make sure the devices show up in Tuya’s cloud portal under the devices tab.
- In the Tuya IoT configuration cloud portal, you must NOT link your non-developer account under the “Users” tab. Doing so will work, and you can even still add the devices under the devices tab, but the API will send 0 devices down to Home Assistant. You must only link the account under the Devices->“Link Tuya App Account”. If it shows up on the users tab, be sure to delete it.
- Your region may not be correctly set.
- Make sure your cloud plan does not need to be renewed (see error #28841002 on this page).
Incorrect Access ID or Access Secret. Please refer to the Configuration part above.
- App account not linked with cloud project: On the Tuya IoT Platform, you have linked devices by using Tuya Smart or Smart Life app in your cloud project. For more information, see Link devices by app account.
- Incorrect username or password: Enter the correct account and password of the Tuya Smart or Smart Life app in the Account and Password fields (social login, which the Tuya Smart app allows, may not work, and thus should be avoided for use with the Home Assistant integration). Note that the app account depends on which app (Tuya Smart or Smart Life) you used to link devices on the Tuya IoT Platform.
- Incorrect country. You must select the region of your account of the Tuya Smart app or Smart Life app.
Empty parameter of username or app. Please fill the parameters refer to the Configuration part above.
- Make sure you use the Tuya Smart or SmartLife app account to log in. Also, choose the right data center endpoint related to your country region. For more details, please check Country Regions and Data Center.
- Your cloud project on the Tuya IoT Development Platform should be created after May 25, 2021. Otherwise, you need to create a new project.
- This error can often be resolved by unlinking the app from the project (
Link Tuya App Account>
Unlink) and relinking it again.
Your subscription to Tuya cloud development IoT Core Service resources has expired, please extend it in
Cloud Services >
IoT Core >
My Subscriptions tab >
Subscribed Resources >
IoT Core >
Extend Trial Period.
Tuya supports scenes in their app. These allow triggering some of the more complex modes of various devices such as light changing effects. Scenes created in the Tuya app will automatically appear in the Scenes list in Home Assistant the next time the integration updates.
- Tuya Integration Documentation Page
- Supported Tuya Device Category
- Error Code and Troubleshooting
- Countries/Regions and Tuya Data Center