Tuya wifi switches toggle off after on

I created account for posting the solution that worked for me.
Find the file core.config_entries. I had this in /usr/share/...:

/usr/share/hassio/homeassistant/.storage/core.config_entries 

From this file, and additionally from any other .yaml file you have configured tuya devices in, remove the line having color_temp, e.g.
"color_temp": 21,

Restart Home Assistant.
After this, tuya light in my setup remained enabled and it started showing correct status as well!

I don’t think what you did fixed the issue. I believe the restart reloaded the config which resolved the issue. Has the issue came back for you?

I’m currently having this issue with Tuya.

Still facing the same issue.

None of the previous solutions worked in my case.

This might help if you have Tuya V2 installed through HACS.

I had this problem until this morning.
I have tried all fixes found up until some weeks ago without success.

Earlier the issue was temporarily resolved either with restart or as I found out later, by going to configuration → integrations and reload the integration.
Now after several hours it seems to finally be resolved.

This morning I was fed-up with this, and tried to fix it.
I had Tuya V2 through HACS, and for me this seems to be the problem.
As there now is a new official development of Tuya in Home Assistant, I changed to that one.
It was a little trial and error before it worked.

First I deleted the integration in Home Assistant, then deleted the integration in HACS. I renamed the folder (in file editor config/custom_components/tuya_v2) to something else (I just put an x infront (xtuya_v2)).

I then installed the official integration (It was automatically suggested when I got to the integration page in Home Assistant), remember that you need “Access ID” and “Access Secret” from Tuya IoT Platform (https://iot.tuya.com/).
You log in, and find it in Cloud → Development → Overview
You also need the app username (email) and password.

At the same time I changed to the Tuya APP, so I had to add all Devices again.
But for me that was a small price to pay to make the automations work properly again.
I do not know if Smart Life login will work, or if you need the Tuya APP login.
You might need to check all automations, just to be sure that everything is as it should be.

I hope this helps someone else with this irritating problem.

I’ve been encountering this too - have finally spent some time on it, including all of the above (tired both HACS/local-tuya, and the official integration - both with the same result).

Anyone confirmed this is fixed?

After about 3 weeks, I have had no issues.

The integration is now stable, and switches respond as they should.
Also temperature and electricity readings is updating at set interval now.

Thanks.

Do you know which region you’re connected to for tuya?

Does anyone have this working in the EU region? Wondering if it might be region specific?

I’m on the EU server:
image

Thanks.

Perhaps I need to look closer to home :grimacing:

I reinstalled the integration today but still the same issue… It comes on when i turn it on but when i want to turn it off the toggle automatically goes back to on (and the light is still on)… any ideas? Datacenter is Central Europe (even tried western europe, but that doesn’t work)

Wound up doing this. I have Tuya Wi-Fi valve switches and the new integration method does not seem to update when you turn the switch on or off (manually or from Home Assistant). Doing a reload every 15 sec for now. Hopefully that doesn’t generate too many calls.

I had the same issue (switches’ state flipped back immediately, state doesn’t reflected well, reload the integration recovered state) when I opened a project on Tuya’s cloud development with 2 data centers and without the full API permissions documented as needed on Tuya - Home Assistant (home-assistant.io).

Even when I have updated the project to have 1 data center, and had the full required permissions the issue haven’t stopped. Deleting Tuya’s integrations on HA and adding it again didn’t help either.

I then created a new project (same Tuya App account) with 1 data center and the 5 required APIs’ permissions, deleted the integration then added it again with the new project details and everything worked as it should.

Hope that helps anyone.

1 Like

Is this still a known issue as getting this myself and wanted to know if any possible fixes

I’ve had it for a week now.

Just starting getting it now as well - recently installed a RGB tuya wifi smart bulb and now it keep turning itself off every 10seconds.

Update for anyone else reading - I logged a ticket with Tuya devs and within 2hours they pushed a new firmware out to fix my issue. - awesome to see them so pro active.