fix: climate entity swing mode setting (#1486)
Some checks failed
Tests / check-rule-format (push) Failing after 1s
Validate / validate-hassfest (push) Failing after 0s
Validate / validate-hacs (push) Failing after 6s
Validate / validate-lint (push) Failing after -1s
Validate / validate-setup (push) Failing after 0s

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: