#Local Tuya broke -- can't configure

1 messages · Page 1 of 1 (latest)

modern ibex
#

So irritated, had this working but I accidentally broke it and can't now fix it.
I had Local Tuya working perfectly (including the cloud API connection) with a single device. Wanted to add another device, and stupidly created a new API integration rather than adding a new device -- the API creation worked but nuked the original one and lost my device (of course).
However when I went to add the device back by clicking configure icon, I get an error.
I have tried restarting, deleting the Local Tuya / restart / add-back the integration. Still the same error:
"Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble"
I assume that somehow the old version left some detritis in a config file somewhere so the reinstalled version is getting confused / upset. Can anyone help?
I am running latest HA OS on Pi 5.
Thanks

Installation method
Home Assistant OS
Core
2025.12.2
Supervisor
2025.12.3
Operating System
16.3
Frontend
20251203.2

lyric estuary
#

You need to change one things, i give you the methode :

Get a SSH terminal module
Install it
Go on your SSH terminal
tape : cd /config/custom_components/localtuya/
tape : nano config_flow.py
Do : Crtl + F and search self.config_entry
Change it on : self._config_entry

And it's gona work !

modern ibex
#

Well s^^t me it worked! Wow! Thank you.

I've just spent two hours poking around in the config files looking for broken remnants of previous attempts to get this how I want it (I found a few... on Github if you're interested! https://github.com/rospogrigio/localtuya/issues/2134#issuecomment-3652334231

Can you just tell me what the heck this was about? i.e. why did I need to edit a Python script and add a single '_' and suddenly it worked? Seems so completely random! I assume something broke from version to version, or maybe the latest version of HA Core changed how it interprets syntax? This is only for my learning and curiosity!

Amazing. Thank you. I am soooooo far out of my depth on this stuff so really appreciate the help. 🙏

GitHub

The problem <-- Had previously successfully established the cloud API, added a single device, worked perfectly / first time. Needed to add a second device. Misunderstood how do to it, accidental...