Tuya outdoor switch showing a Executed: January 22, 2025 at 4:00:00 PM Error: network error:(SYSTEM_ERROR) Server Error

Hi. I have a Tuya based outdoor plug switch that controls my pool pump. It works fine 8 times out of 10. For the other times it shows the following error in the automation traces:

Executed: January 22, 2025 at 4:00:00 PM
Error: network error:(SYSTEM_ERROR) Server Error

Even through the switch is near the end of the networks reach it never appears to be offline and the network shows no errors or disconnections. I can always turn it off an on via a dashboard button I have set up and the error only seems to happen when it runs via an automation.

I am wondering whether the server error means ‘I can’t access the internet’ or whether it is ‘I can’t access the HA server’ or something else completely. The Tuya integration I have operating is not the local one and I have 21 devices that operate with no problem on a daily basis.

Amy ideas of clues would be much appreciated.