From 38e2a2627477a9ecf40e34b0f221367537299f66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=92=B8=E9=B1=BC=E8=80=8C=E5=B7=B2?= <64669899+hvvvvvvv@users.noreply.github.com> Date: Sun, 14 Jul 2024 13:35:05 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix=20option=20`interval=5Fsecon?= =?UTF-8?q?ds`=20(#1763)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom_components/xiaomi_miot/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/xiaomi_miot/__init__.py b/custom_components/xiaomi_miot/__init__.py index 08ddcf0fc..1964812e9 100644 --- a/custom_components/xiaomi_miot/__init__.py +++ b/custom_components/xiaomi_miot/__init__.py @@ -841,6 +841,8 @@ def update_custom_scan_interval(self, only_custom=False): tim = timedelta(seconds=sec) if sec > 0 and tim != self.platform.scan_interval: self.platform.scan_interval = tim + if hasattr(self.platform, 'scan_interval_seconds'): + self.platform.scan_interval_seconds = tim.total_seconds() _LOGGER.debug('%s: Update custom scan interval: %s', self.name_model, tim) def update_custom_parallel_updates(self):