Here is an automation posted on another thread by sesardelaisla which will reload the entities every so often, obviously not a fix but it might help some people.
Iāve been having the same problem. After a length of time Tuya and HA donāt communicate any longer. I was tired to restarting HA to fix this mess, so I switch to Local Tuya tonight. Problem solved.
I also facing the same issue. Tuya devices not updated after updating to v2021.12.xx. I have to restart HA , then it will update the status. seems like the it does not receiving notification from the tuya server.
I have to admit I am really dissapointed with this whole TUYA situation lately. The image I have is that they came with much bravado and showmanship to this whole ordeal. They had huge plans for make to ultimate integration with local support etc. I donāt doubt it is still coming at some point, but it seems that couldnāt deliver or are not really interested. Frenck did a lot of work to fix the integration all by himself (thank you Frenck like always), I am not mistaken, and somehow feel that Tuya itself is just lacking in participation. It is not just on HA side they give a bad image, but it makes question should I buy their products anymore.
And I might be wrong many ways, but this just how I feel.
I completely agree with you. The issues only started with the official Tuya integration so the buck stops right at Tuyaās door. I had my concerns when I had to endure a painful sign up process to the Tuya cloud application but persevered. I have not been rewardedā¦ I definitely wonāt be buying any more Tuya related products as thereās far more to life than beta (alpha?) testing for a company that has badly dropped the ball.
I havenāt had to reload the Tuya integration for almost 24 hours. Anyone know if there was progress on the implementing the fix? Or, have I just been lucky?
Update: Had to reload again at just about the 24-hour mark.
Unfortunately, the manual fix of restarting or reloading the integration also screws with the logs and makes the items unavailable for a moment, and resets the last state to the current time.
As I have automation that uses a time delta since the last state, this resets the delta.
One of those automations is a heater in the garage fridge to avoid my fridge malfunctioning due to the cold, as it sits right now if I use the reload integration it rests the time since last switched and may cause the heater to run longer than needed, thereby warming the refrigerator up to the point that it can spoil food.
So while the fix may be easy, it is not useful for all.
I think @molnart might have been referring to the PR as the manual fix. It can be applied in just a few minutes. Two small changes need to be made in the /usr/local/lib/python3.9/site-packages/tuya_iot/openapi.py file. The changes can be seen here:
It took me longer to figure out how to access the file than to make the changes. In case it helps anyone, I use portainer which makes it easy to launch a shell in the homeassistant container. Since I didnāt want to mess with installing an editor in the container shell, I copied the file to my homeassistant directory, edited it with WinSCP, then copied it back to the proper location. After a server restart, the Tuya integration seems to be stable, although time will tell if that fix worked. Hope this helps.
Where did you find the file? Iāve spent some time trawling through my HA server but havenāt been able to locate it anywhere let alone in directory tree shown.
Latest HA update seems to have fixed this issue. Iāve just installed it hence my cautiousness but itās looking good with button states correctly reflected on the dashboard.
Running 2021.12.10. Occasionally I had this issue that status of tuya bulb in HA doesnāt sync to the actual status of the bulb. Not sure how to solve it.
Same as @henry8866 here.
Status of TUYA bulbs get out of sync with HA but it gets fixed after a TUYA/HA reload/reset.
Really thinking about moving to LocalTuya at this point
I was moving from localtuya. Itās no better. When I was using localtuya, devices were randomly became unavailable, had to remove it and add it back to fix it.
Thanks for the information. I may try it later if localTuya is stable.
Do you know if there is service that I can use in NodeRed to do the āreloadā as you described?