mirror of
https://github.com/home-assistant/core.git
synced 2025-04-28 11:17:53 +00:00
Fix preset modes error in Smartthings (#105375)
This commit is contained in:
parent
25586f9efd
commit
f37f40c338
@ -528,10 +528,10 @@ class SmartThingsAirConditioner(SmartThingsEntity, ClimateEntity):
|
|||||||
|
|
||||||
def _determine_preset_modes(self) -> list[str] | None:
|
def _determine_preset_modes(self) -> list[str] | None:
|
||||||
"""Return a list of available preset modes."""
|
"""Return a list of available preset modes."""
|
||||||
supported_modes = self._device.status.attributes[
|
supported_modes: list | None = self._device.status.attributes[
|
||||||
"supportedAcOptionalMode"
|
"supportedAcOptionalMode"
|
||||||
].value
|
].value
|
||||||
if WINDFREE in supported_modes:
|
if supported_modes and WINDFREE in supported_modes:
|
||||||
return [WINDFREE]
|
return [WINDFREE]
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user