Only determine SmartThings swing modes if we support it (#139571)

Only determine swing modes if we support it
This commit is contained in:
Joost Lekkerkerker 2025-03-01 13:08:28 +01:00 committed by GitHub
parent 3edc7913de
commit df95902004
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -351,7 +351,8 @@ class SmartThingsAirConditioner(SmartThingsEntity, ClimateEntity):
)
self._attr_hvac_modes = self._determine_hvac_modes()
self._attr_preset_modes = self._determine_preset_modes()
self._attr_swing_modes = self._determine_swing_modes()
if self.supports_capability(Capability.FAN_OSCILLATION_MODE):
self._attr_swing_modes = self._determine_swing_modes()
self._attr_supported_features = self._determine_supported_features()
def _determine_supported_features(self) -> ClimateEntityFeature: