Skip to content

Commit

Permalink
Merge pull request #29 from crevetor/fix-swing-error
Browse files Browse the repository at this point in the history
Don't raise when reading an unsupported property
  • Loading branch information
rewardone committed Sep 10, 2024
2 parents 4464823 + 41ab018 commit 9a9f9c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ayla_iot_unofficial/fujitsu_hvac.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ async def async_set_swing_mode(self, val: SwingMode):
@property
def horizontal_swing(self) -> bool:
if not self.has_capability(Capability.SWING_HORIZONTAL):
raise SettingNotSupportedError("Device does not support horizontal swing")
return False

return self.property_values[HORIZ_SWING_PARAM_MAP[self.model]] == SWING_VAL_MAP[self.model][True]

Expand All @@ -373,7 +373,7 @@ async def async_set_horizontal_swing(self, val: bool):
@property
def vertical_swing(self) -> bool:
if not self.has_capability(Capability.SWING_VERTICAL):
raise SettingNotSupportedError("Device does not support vertical swing")
return False

return self.property_values[VERT_SWING_PARAM_MAP[self.model]] == SWING_VAL_MAP[self.model][True]

Expand Down

0 comments on commit 9a9f9c9

Please sign in to comment.