Home Assistant, LocalTuya goodbye delay
- 22 de julho de 2025
If you use many Tuya devices in your Home Assistant this post is for you.
Here at home I have more than 25 RGB spots, Wi-Fi switches, presence sensors, door sensors and the like. I’ve felt very frustrated when triggering a command and noticing a 2, 3 second delay for something to happen.
In my case, this delay started to bother me mainly in scenarios involving multiple devices, like when an automation tries to turn everything on together, clearly, that classic situation where the internet goes down and your “smart” home stops being… so smart.
The standard Tuya integration works. But it depends 100% on the internet. Everything goes through Tuya’s cloud servers, far away. And like everyone who has ordered pastel delivery knows, the farther away, the longer it takes. Besides, no internet = no automation.
LocalTuya solves all this by connecting Home Assistant directly to the local network. Result is instant response, control even without internet, and automations that work when you need them (including at dawn, when you can’t go groping walls looking for the switch).
But of course, not everything is roses. There’s always that annoying part. Or there was.
The ace up the sleeve, the fork with auto-import via API
Setting up the official LocalTuya can be quite annoying. You needed to discover Device ID, Local Key, IP, and still manually map the DPIDs. For 1 device, fine. For 40… good luck buddy.
That’s when looking for alternative solutions I found the best possible fork.
https://xzetsubou.github.io/hass-localtuya/usage/installation/
This fork does what should be the standard of the official integration, pulls everything from the Tuya API. It lists all devices, local key, IP, DPID, names, and already leaves everything organized in Home Assistant. With a few clicks, your devices appear magically. Or better, automagically.
How to configure
1. Have HACS installed
If you don’t have it yet, take a look at this post here.
2. Add the fork repository to HACS
Use the link below to add the fork repository to HACS:
After that:
- Go to HACS > Integrations
- Click on “LocalTuya”
- Install the integration
- Restart Home Assistant
3. Create your Tuya IoT Platform account
- Access: https://iot.tuya.com
- Register as “Individual Developer”
- Go to Cloud > Project > Create Cloud Project
- Name it whatever you want
- Choose “Smart Home” and America region (or the closest to you)
- Check all API permissions
4. Link your Tuya / Smart Life app account
- Go to Devices > Link devices by App Account
- Click “Add App Account”
- Scan the QR code with the Tuya app (in developer mode)
- Done! Your devices are now visible in the cloud project
5. Add the hub in Home Assistant
You have two ways to add the hub (the magic starts here):
Or go manually to:
- Settings > Devices and Services > + Add Integration > LocalTuya
Now you choose:
-
Use Cloud API: if you did the process above, enter: ,
Access ID,Access Secret, Region (ex:us,eu, etc.) , Login type (email or phone) -
Or continue in fully local mode: check the “Disable Cloud API” option and do everything in offline mode (less practical, but possible).
As soon as the hub is added, it will show all linked devices and their functions already mapped. Simple as that.
After I configured everything using this method:
- Lights respond before I finish touching the button
- Automations run like clockwork, no delay, no failure
- Even without internet, the house continues working
- Zero manual mapping. Seriously, zero.
If you have many Tuya devices, this is the best way to have everything working for real.
Zetsubou’s fork became my standard. I don’t intend to have to go back to the official integration.
Direct link for you to start: https://xzetsubou.github.io/hass-localtuya/usage/installation/