mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-11-21 03:28:57 +08:00
fix: climate entity swing mode setting (#1486)
Some checks failed
Some checks failed
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user