diff --git a/custom_components/duofern/cover.py b/custom_components/duofern/cover.py index c471de2..8f8004c 100644 --- a/custom_components/duofern/cover.py +++ b/custom_components/duofern/cover.py @@ -49,6 +49,7 @@ def __init__(self, id, desc, stick, hass): self._openclose = 'stop' hass.data[DOMAIN]['devices'][id] = self self._last_update_time = datetime.datetime.now() + self._updating_interval = 5 @property def name(self): @@ -127,6 +128,6 @@ def update(self): self._openclose = self._stick.duofern_parser.modules['by_code'][self._id]['moving'] except KeyError: self._state = None - if datetime.datetime.now() - self._last_update_time > datetime.timedelta(minutes=5): + if datetime.datetime.now() - self._last_update_time > datetime.timedelta(minutes=self._updating_interval): self._stick.command(self._id, 'getStatus') _LOGGER.info(f"{self._id} state is now {self._state}") diff --git a/custom_components/duofern/manifest.json b/custom_components/duofern/manifest.json index c48727e..91d974f 100644 --- a/custom_components/duofern/manifest.json +++ b/custom_components/duofern/manifest.json @@ -6,6 +6,6 @@ "config_flow": true, "issue_tracker": "https://github.com/gluap/pyduofern-hacs/issues" , "codeowners": ["@gluap"], - "requirements": ["pyduofern==0.35.0"], - "version": "0.4.2" + "requirements": ["pyduofern==0.35.1"], + "version": "0.4.3" }