Tuya wifi switches toggle off after on

Hi, recently upgraded to Tuya v2 and now my light switches toggle off in the UI about 1s after being manually toggled on. Then they go into this weird state where I have to toggle on then off again to get them to turn off. The HA switch toggles don’t accurately reflect the physical switch state.

I had this problem many HA versions ago and it seemed to self heal.

Any ideas?

HA (Docker) 2021.10.6 (latest as of time of writing this)


Just some basics. Have you rebooted the machine? Are you losing wifi signal or reconnecting too often? Is there a chance that Tuya needs to be upgraded? Did you install using HACS?

I have restarted HA core, and also rebooted. Wifi signal is perfect.

What do you mean by “reconnecting too often”?

The Tuya integration is the latest. I installed via the “Integrations” panel - I don’t have HACS.

You router may be losing connection. Not likely but possible. Do you have the IP addresses mapped static?

Do you have all the tuya credentials set up?

Screenshot from 2021-10-21 16-33-23

Yes, this has been setup in the Tuya IOT dashboard, app linked and all authenticated.

IP address is static.

As mentioned this is only happening since I’ve updated the Tuya integration. For months prior this was never a problem.

Im facing the same issue!
I have some GoSund Plugs appearing as switches in Homeassistant.
I moved to the new Tuya IOT and 1-2 seconds after turning a switch on, it changes its state automatically.

In Tuya IOT theres a log of all actions. When I turn the switch on (e.g. in Homeassistant), it switches automatically off again and the log says “Device itself”.

Its also saying “Device itself”, when I press the Hardware-Button of the Device.

I can imagine, that this is a software problem of the Gesund Smart Plug which needs to be updated.

I have exact same issue with that new integration. There’s something jumbled up with the API calls made by their Homeassistant integration which effects some devices.

I spent a solid week going back and forth with the Tuya Devs and they have finally found the problem. I’m sure a fix isn’t all that far away.

1 Like

Thanks for the information! Im looking forward to this update! :pray:

Thanks for this useful info Paradox8, it brings hope of a working Tuya setup returning.

I updated to Tuya v2. 0 and like others, I have the switch problems (plus other issues!)
I’ve currently reverted to the old Tuya as I’ve many automations running that depend on it.

So, I’m sure I wouldn’t be alone in being extremely grateful for any updates you receive from Tuya when they solve/make any changes.

Might it be you forgot to add the “Device Status Notification” API? That causes this issue.

No, there’s an issue where you get really weird behaviour with some devices.

In my case, I have a powerboard with 4 sockets on it.

Using the Smart Life App, it all works correctly, and the status of the sockets report correctly in HA.

Turning on the plugs using HA, all works as expected, Switch 1 turns on Plug 1, Switch 2 turns on socket 2, switch 3 turns on socket 3 etc.

Turning off though using HA, Switch 4 turns off Socket 1, Switch 1 turns off Socket 2, Switch 2 turns off socket 3…this then causes chaos with the device statuses and they quickly become out of sync and thus inoperable.

As I mentioned though, after a great deal of back and forth with their Devs who initially did not see any issues, have now found out what’s wrong. They did not go into specifics, but from the couple of hours I’ve spent trying to isolate the source of the problem when I was trying to convince them of an issue, I’m certain it’s the HA integration sending incorrect API calls for some devices. I’m using the Tuya Local integration now (which is bloody amazing and I’m going to keep using it from now on instead of the offical Cloud based integration) with the exact same Dev Project in their Platform and that works flawlessly, so it’s definitely not an issue with the API itself, it has to lie in their new HA integration

1 Like

Hey @Paradox8 I think the question was directed at the OP, not at your issue, which may or may not have the same cause.

I have now installed this API, rebooted, uninstalled/reinstalled the Tuya integration in HA, but still the same problem. Is there any additional configuration needed with this API?

I’d be more than happy to downgrade to the previous Tuya integration (v1?) if that’s possible. That was working fine. Not sure what benefits this v2 upgrade brings other than a whole lot of headaches.

Thank you @sbobergje, exactly this for me. When I set up the Tuya Development as in the Tuya integration instructions, the “Device Status Notification” didn’t show, and the toggle problem showed up. I reverted to a HACS version and all OK. I had to ‘purchase’ the “Device Status Notification” API (no cost) in the Tuya Development system and add to the project. I then deleted the HACS version, re-installed the core Tuya integration, and devices toggle as expected.

Is there any news?
It still doesn’t work for me…
Thank you in advance!
Best regards!

Tuya are no longer looking after the Tuya Integration. Frenck took it over so its been looked after in-house now…no idea where things are at though.

Have you tried using Local Tuya instead? If you’ve set up everything in the Tuya Dev platform you’re like 90% of the way there - and the big perk of the Local Tuya add-on is that its super responsive, much quicker than the cloud integration. This is the route I’ve taken and I’m incredibly happy with it.

Is there any documentation on how to set up all the parameters for lights and other devices on Tuya Local? There are quite a few and last I tried I couldn’t find anything about how to even find out what the parameters are.

@mftas - Just use option 2 - nothing like that is involved if you go this route. All done via the UI. Super quick.

I have exactly the same problem here.