From f49e76937ca2afda913e611d624413aea5bad1b7 Mon Sep 17 00:00:00 2001 From: Li Shuzhen Date: Fri, 7 Nov 2025 10:19:31 +0800 Subject: [PATCH] fix: climate entity swing mode setting (#1486) --- custom_components/xiaomi_home/climate.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/custom_components/xiaomi_home/climate.py b/custom_components/xiaomi_home/climate.py index 9d872e3..50d49a0 100644 --- a/custom_components/xiaomi_home/climate.py +++ b/custom_components/xiaomi_home/climate.py @@ -320,9 +320,15 @@ class FeatureSwingMode(MIoTServiceEntity, ClimateEntity): await self.set_property_async(prop=self._prop_vertical_swing, value=True) elif swing_mode == SWING_HORIZONTAL: + if self._prop_vertical_swing: + await self.set_property_async(prop=self._prop_vertical_swing, + value=False) await self.set_property_async(prop=self._prop_horizontal_swing, value=True) elif swing_mode == SWING_VERTICAL: + if self._prop_horizontal_swing: + await self.set_property_async(prop=self._prop_horizontal_swing, + value=False) await self.set_property_async(prop=self._prop_vertical_swing, value=True) elif swing_mode == SWING_OFF: