From 2db0d38f5113016b0ef1e470659a5d8e02f8c500 Mon Sep 17 00:00:00 2001 From: Alone Date: Tue, 24 Dec 2024 13:28:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20improve=20for=20local?= =?UTF-8?q?=20only=20mode=20(#2115)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom_components/xiaomi_miot/core/device.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/xiaomi_miot/core/device.py b/custom_components/xiaomi_miot/core/device.py index fe771855e..6de59701c 100644 --- a/custom_components/xiaomi_miot/core/device.py +++ b/custom_components/xiaomi_miot/core/device.py @@ -710,14 +710,14 @@ async def async_write(self, payload: dict): def use_local(self): if self.cloud_only: return False + if not self.local: + return False if self.local_only: return True if self.miio2miot: return True if self.custom_config_bool('miot_local'): return True - if not self.local: - return False if self.model in MIOT_LOCAL_MODELS: return True return False