From fbd8d995ed0132088f9499eeaa13c86c698e5848 Mon Sep 17 00:00:00 2001 From: seydx Date: Thu, 22 May 2025 00:16:31 +0200 Subject: [PATCH] refactor and increase timeout --- pkg/tuya/{sharing_api.go => open_api.go} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename pkg/tuya/{sharing_api.go => open_api.go} (99%) diff --git a/pkg/tuya/sharing_api.go b/pkg/tuya/open_api.go similarity index 99% rename from pkg/tuya/sharing_api.go rename to pkg/tuya/open_api.go index 88ec223d..4bd2a044 100644 --- a/pkg/tuya/sharing_api.go +++ b/pkg/tuya/open_api.go @@ -225,12 +225,12 @@ func (c *TuyaOpenApiClient) GetAllDevices() ([]Device, error) { return nil, err } - time.Sleep(500 * time.Millisecond) + time.Sleep(2 * time.Second) deviceMap := make(map[string]Device) for i, home := range homes { if i > 0 { - time.Sleep(300 * time.Millisecond) + time.Sleep(500 * time.Millisecond) } devices, err := c.queryDevicesByHome(home.OwnerID)