Skip to content

Commit

Permalink
Fix preset modes error in Smartthings (home-assistant#105375)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjohansson-ST authored Dec 9, 2023
1 parent 25586f9 commit f37f40c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/smartthings/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,10 +528,10 @@ def swing_mode(self) -> str:

def _determine_preset_modes(self) -> list[str] | None:
"""Return a list of available preset modes."""
supported_modes = self._device.status.attributes[
supported_modes: list | None = self._device.status.attributes[
"supportedAcOptionalMode"
].value
if WINDFREE in supported_modes:
if supported_modes and WINDFREE in supported_modes:
return [WINDFREE]
return None

Expand Down

0 comments on commit f37f40c

Please sign in to comment.