mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-11-20 19:19:01 +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,
|
await self.set_property_async(prop=self._prop_vertical_swing,
|
||||||
value=True)
|
value=True)
|
||||||
elif swing_mode == SWING_HORIZONTAL:
|
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,
|
await self.set_property_async(prop=self._prop_horizontal_swing,
|
||||||
value=True)
|
value=True)
|
||||||
elif swing_mode == SWING_VERTICAL:
|
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,
|
await self.set_property_async(prop=self._prop_vertical_swing,
|
||||||
value=True)
|
value=True)
|
||||||
elif swing_mode == SWING_OFF:
|
elif swing_mode == SWING_OFF:
|
||||||
|
|||||||
Reference in New Issue
Block a user