diff --git a/source/_integrations/tuya.markdown b/source/_integrations/tuya.markdown index 4bde7b5cbeb..2af5f30bee1 100644 --- a/source/_integrations/tuya.markdown +++ b/source/_integrations/tuya.markdown @@ -3,7 +3,6 @@ title: Tuya description: Instructions on how to setup the Tuya hub within Home Assistant. ha_category: - Climate - - Cover - Fan - Light - Scene @@ -26,103 +25,112 @@ ha_platforms: The Tuya integration allows integrating all Powered by Tuya devices you have added to the Tuya Smart and Tuya Smart Life apps. This integration is officially maintained by Tuya. -{% include integrations/config_flow.md %} - ## Supported platforms + - **Climate**: Air conditioner, heater, thermostat. -- **Cover**: Curtain, curtain switch. - **Fan**: Fan, air purifier, humidifier, dehumidifier. - **Light**: Light, light strip, ambient light, light string, humidifier's light, Ceiling light. - **Scene**: Smart scene. - **Switch**: Switch, socket, power strip, smart kettle, breaker, pet water feeder, air purifier, diffuser. -## Quick installation and startup +## Configure the Tuya IoT Platform -### Configure on the Tuya IoT Platform +### Prerequisites -#### Prerequisites +- You have created an account for [Tuya Smart or Smart Life app](https://developer.tuya.com/en/docs/iot/tuya-smart-app-smart-life-app-advantages?id=K989rqa49rluq#title-1-Download). +- You have created a [Tuya IoT Platform account](https://iot.tuya.com/) -You have created an account for [Tuya Smart or Smart Life app](https://developer.tuya.com/en/docs/iot/tuya-smart-app-smart-life-app-advantages?id=K989rqa49rluq#title-1-Download). +### Create a project -#### Create a project +1. Log in to the [Tuya IoT Platform](https://iot.tuya.com/). +1. In the left navigation bar, click **Cloud** > **Projects**. +1. On the page that appears, click **Create**. +1. In the **Create Project** dialog box, configure **Project Name**, **Description**, **Industry**, and **Availability Zone**. In the **Development Method** field, select **Smart Home PaaS** from the dropdown list. Select all available zones. +  +1. Click **Create** to continue project configuration. +1. In **Configuration Wizard**, select **Device status notification** API. (**Note:** **Smart Home PaaS** API has been selected as default.) +  +1. Click **Authorize**. -**1.** Log in to the [Tuya IoT Platform](https://iot.tuya.com/). - -**2.** In the left navigation bar, click **Cloud** > **Projects**. - -**3.** On the page that appears, click **Create**. - -**4.** In the **Create Project** dialog box, configure **Project Name**, **Description**, **Industry**, and **Availability Zone**. In the **Development Method** field, select **Smart Home PaaS** from the dropdown list. Select all available zones. - - - -**5.** Click **Create** to continue project configuration. - -**6.** In **Configuration Wizard**, select **Device status notification** API. - > **Note:** **Smart Home PaaS** API has been selected as default. - - - -**7.** Click **Authorize**. - -#### Get authorization key +### Get authorization key Click the created project to enter the **Project Overview** page and get the **Authorization Key** used to make API calls.  -#### Link devices by app account +### Link devices by app account Link devices by your app account and copy the **Device ID** in the **Device List** to the clipboard for specifying `device_id` later. -**1.** Navigate to the **Devices** tab. +1. Navigate to the **Devices** tab. +1. Click **Link Tuya App Account** > **Add App Account**. +  +1. Scan the QR code that appears using the **Tuya Smart** app or **Smart Life** app. +  +1. Click **Confirm** on your **Tuya Smart** or **Smart Life** app. +1. Navigate to the **Device List** tab. You can find the devices that have been added through your **Tuya Smart** or **Smart Life** account. +  -**2.** Click **Link Tuya App Account** > **Add App Account**. - - -**3.** Scan the QR code that appears using the **Tuya Smart** app or **Smart Life** app. - - -**4.** Click **Confirm** on your **Tuya Smart** or **Smart Life** app. - -**5.** Navigate to the **Device List** tab. You can find the devices that have been added through your **Tuya Smart** or **Smart Life** account. - - -### Install the Tuya Home Assistant integration - -#### Install the Tuya integration - -In **Configuration** > **Integrations** > **ADD INTEGRATION**, search for the keyword **Tuya** and select it for installation. - - -#### Enter your Tuya credential - -In the Tuya Integration window, select **Smart Home PaaS** and click **SUBMIT**. +{% include integrations/config_flow.md %}  -See the following table and enter your Tuya credential. +{% configuration_basic %} + Region: + description: Choose the Tuya IoT region to use. -| Field | Description | -| ------- | -------- | -| Access ID and Access Secret| Go to your cloud project on [Tuya IoT Platform](https://iot.tuya.com/). Find the **Access ID** and **Access Secret** on the **Project Overview** tab.| -| Mobile App | Must select the one you used to link devices on the Tuya IoT Platform. | -| Country Code | The country you select on logging in to Tuya Smart or Smart Life app.| -| Account | Tuya Smart or Smart Life app account. | -| Password | The password of your app account. | + "Tuya IoT Access ID": + description: Go to your cloud project on [Tuya IoT Platform](https://iot.tuya.com/). Find the **Access ID** under [Authorization Key](#get-authorization-key) on the **Project Overview** tab. -
The app mentioned in the table must be the one you used to link devices on the Tuya IoT Platform.
+ "Tuya IoT Access Secret": + description: Go to your cloud project on [Tuya IoT Platform](https://iot.tuya.com/). Find the **Access Secret** under [Authorization Key](#get-authorization-key) on the **Project Overview** tab. + + Account: + description: Tuya Smart or Smart Life app account. + + Password: + description: The password of your app account. + +{% endconfiguration_basic %} ## Error codes and troubleshooting -|Error Code|Error Message|Troubleshooting| -|:----|:--------|:------------------------------| -|1004| sign invalid| Incorrect Access ID or Access Secret. Please refer to [Tuya credential table](https://github.com/tuya/tuya-home-assistant/wiki/Install-Tuya-v2?_source=d10de34623e3daca5b02e3c31528a0c4#3-enter-your-tuya-credential). -|1106|permission deny|