diff --git a/custom_components/localtuya/cover.py b/custom_components/localtuya/cover.py index f3a97ea..6b5d7e1 100644 --- a/custom_components/localtuya/cover.py +++ b/custom_components/localtuya/cover.py @@ -88,8 +88,6 @@ def setup_platform(hass, config, add_entities, discovery_info=None): pytuyadevice.set_version(float(config.get(CONF_PROTOCOL_VERSION))) dps = {} dps[config.get(CONF_ID)]=None - dps["101"]=None - dps["102"]=None pytuyadevice.set_dpsUsed(dps) cover_device = TuyaCoverCache(pytuyadevice) @@ -163,7 +161,7 @@ class TuyaCoverCache: self._lock.acquire() try: now = time() - if not self._cached_status or now - self._cached_status_time > 30: + if not self._cached_status or now - self._cached_status_time > 15: sleep(0.5) self._cached_status = self.__get_status() self._cached_status_time = time() diff --git a/custom_components/localtuya/light.py b/custom_components/localtuya/light.py index 1193eb6..464d5f1 100644 --- a/custom_components/localtuya/light.py +++ b/custom_components/localtuya/light.py @@ -124,7 +124,7 @@ class TuyaCache: self._lock.acquire() try: now = time() - if not self._cached_status or now - self._cached_status_time > 30: + if not self._cached_status or now - self._cached_status_time > 15: sleep(0.5) self._cached_status = self.__get_status(switchid) self._cached_status_time = time()