Problems getting Local Tuya working

Hi there,
I’m just getting started with Home Assistant and I’ve been using the builtin Tuya cloud based integration for my Smart Life devices, but I’ve found that HA tends to lose connection to some of the devices after a while, and the status doesn’t update and the devices won’t switch any more.

I thought I’d try the Local Tuya HACS integration, and I’ve got it installed and talking to my TUYA IOT project, but I’m having difficulties adding devices.

When I add a new device it initially detects the DPs, but I can’t understand if I’m supposed to add each device as a single entity, or multiple entities. For example, I have smart switches that have power monitoring. Is that one entity for the switch (power on or off) and a second entity for the monitoring?

Also, I’ve found if I select the wrong DP e.g. as the switch to start, then going back to edit the device I can’t add another DP as a switch? Any advice how I should be doing that?

It also seems that after I remove a device and attempt to re-add it the DP auto detection fails.

Any advice gratefully received!

I’ve persevered with this, and finally got it working now.

Useful tips for anyone else trying local tuya:

First, if you are already using the cloud tuya integration, you need to name your entities something different. Tuya local won’t warn you but the integration will error if there is a duplicate name and none of the devices will load. For me the names were auto populated either from my netgear integration or tuya cloud (not sure which) and a couple of tunes I missed the step to rename the item.

Second if you use a smart switch and want the current / Watts readings then each of these are an extra entity. One switch entity for the on/off switch and one sensor entity each for the current Watts etc.

If you didn’t configure the extra dp on initial setup then edit the device and add the extra dp numbers manually in the options on the initial page.
If you try to reconfigure a device and it says it cannot retrieve dps, just add them manually same as above.

Hope this helps someone. Local tuya is working well for me and seems much more reliable than cloud tuya. From what I’ve found in the forum cloud tuya has supposedly fixed the issue with the token not renewing automatically, but for me it still doesn’t work,and loses the device status after a few hours.

Thank you so much, you saved my day!
I had local tuya up and running, but it started bugging a few days ago and I just couldn’t find the problem.
After I read your post I found out, that the problem is, that I “sorted” the device names a few days ago, using the same names in tuya api and local tuya. Never had the idea, that this would cause a problem (as you said, there’s no warning), but obviously it did.
Thank you!