This PR addresses a bug preventing the plugin from working around the authentication error "auth exceeded" returned by the Tuya API when authentication is attempted more frequently than once every 180 seconds.
The code to handle this was already there, but it was checking for an exact string that doesn't match the error message currently returned by the Tuya API (which says "180 seconds" instead of 60):
data.errorMsg === "you cannot auth exceed once in 60 seconds"
In order to fix this, I
Introduced configuration variable to wait a custom amount of time in case of "auth exceeded" error message defaulting
check for a partial string matching the current error message, hoping that if the Tuya API's changes again the amount of time needed before 2 consecutive auth calls the plugin will be ready to the change
This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This PR addresses a bug preventing the plugin from working around the authentication error "auth exceeded" returned by the Tuya API when authentication is attempted more frequently than once every 180 seconds.
The code to handle this was already there, but it was checking for an exact string that doesn't match the error message currently returned by the Tuya API (which says "180 seconds" instead of 60):
data.errorMsg === "you cannot auth exceed once in 60 seconds"
In order to fix this, I
@milo526 please take a look!