Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't raise when reading an unsupported property #29

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading