From 224d6b0bbca11c658fa4f8722bec30525d573421 Mon Sep 17 00:00:00 2001 From: sususweet Date: Tue, 14 Oct 2025 20:37:39 +0800 Subject: [PATCH] feat: fix device support for T0x13. --- custom_components/midea_auto_cloud/light.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/custom_components/midea_auto_cloud/light.py b/custom_components/midea_auto_cloud/light.py index 04980fe..068478a 100644 --- a/custom_components/midea_auto_cloud/light.py +++ b/custom_components/midea_auto_cloud/light.py @@ -226,10 +226,8 @@ class MideaLightEntity(MideaEntity, LightEntity): **kwargs, ): new_status = {} - # 处理预设模式/效果 - 支持 effect 和 preset_mode 参数 - selected_effect = effect or _key_preset_modes - if selected_effect is not None and self._key_preset_modes is not None: - effect_config = self._key_preset_modes.get(selected_effect, {}) + if effect is not None and self._key_preset_modes is not None: + effect_config = self._key_preset_modes.get(effect, {}) new_status.update(effect_config) # 处理亮度设置 - 支持多种参数格式