Tuya Switch stop working and shows "unavaliable" in the night

I installed the tuya switches in my house through local integration, Local tuya and it works correctly but I made an automation with the time so that it turns on a light and turns it off automatically

The problem comes when at night for some reason the switches start to show the “unavailable” status in the registry from time to time and it is not due to automation, what could it be?

Same problem here