LocalTuya keeps replacing hostnames with IP addresses

I have set up the Local Tuya integration using ConfigFlow for my 25+ Tuya devices and it works great at first. All of my devices have hostnames and designated IPs assigned by my router’s DHCP server, and are on their own isolated subnet. I use the hostnames for the “Host” field in the LocalTuya configuration. After a while - sometimes a few days, sometimes a few hours - most or all of the devices go offline, and when I look at the LocalTuya configurations for each device, the value of the “Host” field has been changed to an IP address. I am not sure why this is occurring - I have tried changing them back, and I have tried deleting and re-adding all devices, but eventually the hostnames are replaced with IP addresses. I’m also not sure why the devices stop working when once the hostname is replaced by the IP address. If I add the devices by IP address to begin with, they work ok, but I prefer to use hostnames because that’s what they are for.

Is there a configuration toggle or something inside LocalTuya to prevent it from resolving the hostnames to IP addresses and storing them in the configuration? I suppose if I had to, I could use configuration.yaml to define my entities, but it seems like what I am doing is supported and should work. Thoughts?

I would probably ask this question in the LocalTuya GitHub repo.

I suspect it’s because you did it via config flow. You need to do it via Tuya IOT developer platform??
then extract the local Keys, this method was the only one that worked for me.