How to Find Your Tuya Device Local Key for Home Assistant

Learn how to easily get your Tuya device's Local Key for Home Assistant.

Written on 2025-09-13
Written by Remco Kersten

If you use Home Assistant and want to connect your Tuya-managed IoT devices, you’ll need the Local Key for each device. While retrieving it involves a few steps, it’s straightforward once you know the process. Here’s a step-by-step guide.

Add Your Device to the Tuya App

Before anything else, make sure your device is paired with the Tuya Smart App:

  • Download the app: iOS | Android
  • Follow the instructions in the app to add your device.

Create a Tuya Developer Account

Next, you’ll need a Tuya Developer account:

  • Go to the Tuya Developer Platform and create an account.
  • Navigate to Cloud > Project Management and create a new project.

create_tuya_project.png create_tuya_project_2.png

Link Your Tuya App Account to Developer Account

To access your devices in the developer portal, you need to connect your regular Tuya account:

  • Open the project you created in the previous step.
  • Go to Devices > Link App Account.
  • Click Add App Account.
  • Follow the instructions to link your account.

Once linked, your devices will show up in the developer portal.

link_tuya_account.png

Retrieve the Device’s Local Key

Now you can find the Local Key for your device:

  • Go to Cloud > Devices > All Devices and note the Device ID. tuya_devices.png
  • Navigate to Cloud > API Explorer. tuya_api_explorer.png
  • Select Device Management > Query Device Details and enter the Device ID.
  • In the output, you will see the Local Key. tuya_localkey.png

Conclusion

That’s it! With the Local Key, you can now integrate your Tuya devices into Home Assistant and control them locally.