I am sorry but I can not help you with this one. I am doing nearly all through yaml and config-flow thus I am a novice when it comes to NodeRed
Anyway, while the first couple of month after having installed Local Tuya I had to reload some devices after every restart of the host or after reloading just Supervisor (no clear pattern which devices failed to load correctly, seemed to be random) this got more and more infrequent over time.
Since quite a while now that reloading hassle is not necessary anymore at all (I maintain 5 installations at different locations which have tuya-based devices). Local Tuya is just working flawlessly and devices/entities based on it survive reboots, even after extended power outages without me having to do anything
PS. Make sure your tuya devices get sufficient wlan connection strength. Additionally I always assign static ip addresses to each device through the router (since those devices simply not need dynamically assigned ip addresses).
Iāve been having similar issues with state updates not appearing. I havenāt dug into the debug logs yet but I happened to notice one common factor about the 2 devices (out of 4) that consistently exhibit the issue - they both had low wi-fi connection quality.
I took a punt and moved my 2.4G router to get better coverage and low and behold problem appears to have disappeared . To test this I moved one of the devices back to an area where the wi-fi dropped to low again and low and behold status updates started failing from that device almost immediately. Moved it back, leave it a few minutes and its back to doing proper updates again.
Appreciate this is all a little anecdotal and Iām not saying this is the fix for all the issues people seem to be having but I would recommend checking that the wi-fi signal isnāt at least part of the problem especially if you havenāt already.
I have a socket which Iām trying to control with a toggle automation - it will consistently turn on, but the state doesnāt update and it then will not turn off
The toggle in HA doesnāt seem to do anything (it always reverts back to the off position, even when itās on)
The only way I can then get it to turn off is with the Tuya Alexa skill telling it to turn off (or pull the plug)