fix: climate entity swing mode setting (#1486)

This commit is contained in:
Li Shuzhen
2025-11-07 10:19:31 +08:00
committed by GitHub
parent a1a216aea6
commit f49e76937c

View File

@@ -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: