Local Tuya in Home Assistant: Move Tuya Devices Off the Cloud
Tuya devices are inexpensive and everywhere, but the normal Tuya integration relies on the cloud. Tuya Local can move compatible devices onto local control, reducing lag and keeping useful devices working when the internet or a cloud service has a bad day.
Before you start
Install the Tuya Local integration through HACS and restart Home Assistant. Keep the Tuya or Smart Life app available because the assisted setup uses your existing account and device information.
1. Add the Tuya Local integration
Go to Settings → Devices & services → Add integration and select Tuya Local. Be careful: there are similarly named Tuya integrations.
2. Use Smart Life cloud-assisted setup
The assisted route can retrieve the information needed to identify your devices. Home Assistant asks for the user code from the Tuya/Smart Life app and then asks you to approve the login.
3. Identify the local IP address
Some devices are found automatically; others need their local IP address. The Tuya app can show network information including the MAC address, which you can match against your router or a network scanner.
4. Close the Tuya app while connecting
One of the practical lessons from my setup was to make sure the Tuya app was not actively talking to the device while Tuya Local was trying to connect. Closing the app solved several connection attempts.
5. Select the correct device type
If the integration cannot identify a device automatically, select the closest matching device profile, then give it a useful Home Assistant name and area. Test every control before removing the old cloud entity from your dashboards or automations.
What about Zigbee Tuya devices?
A Tuya-branded device is not necessarily a Wi-Fi Tuya device. If it is Zigbee, it may be better paired directly with ZHA or Zigbee2MQTT instead of trying to make Tuya Local handle it.
Safety devices
Do not make Home Assistant your only safety mechanism for smoke or carbon-monoxide detection. Smart-home reporting can be a useful additional alert, but the certified alarm itself should remain the primary safety device.
