diff --git a/homeassistant/components/smartthings/climate.py b/homeassistant/components/smartthings/climate.py index f07c293939a..656a198f42b 100644 --- a/homeassistant/components/smartthings/climate.py +++ b/homeassistant/components/smartthings/climate.py @@ -173,6 +173,8 @@ class SmartThingsThermostat(SmartThingsEntity, ClimateEntity): flags = ( ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.TARGET_TEMPERATURE_RANGE + | ClimateEntityFeature.TURN_OFF + | ClimateEntityFeature.TURN_ON ) if self._device.get_capability( Capability.thermostat_fan_mode, Capability.thermostat @@ -353,7 +355,10 @@ class SmartThingsAirConditioner(SmartThingsEntity, ClimateEntity): def _determine_supported_features(self) -> ClimateEntityFeature: features = ( - ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE + ClimateEntityFeature.TARGET_TEMPERATURE + | ClimateEntityFeature.FAN_MODE + | ClimateEntityFeature.TURN_OFF + | ClimateEntityFeature.TURN_ON ) if self._device.get_capability(Capability.fan_oscillation_mode): features |= ClimateEntityFeature.SWING_MODE diff --git a/tests/components/smartthings/test_climate.py b/tests/components/smartthings/test_climate.py index ae6e5734e75..475a8f09e03 100644 --- a/tests/components/smartthings/test_climate.py +++ b/tests/components/smartthings/test_climate.py @@ -213,6 +213,8 @@ async def test_legacy_thermostat_entity_state( == ClimateEntityFeature.FAN_MODE | ClimateEntityFeature.TARGET_TEMPERATURE_RANGE | ClimateEntityFeature.TARGET_TEMPERATURE + | ClimateEntityFeature.TURN_OFF + | ClimateEntityFeature.TURN_ON ) assert state.attributes[ATTR_HVAC_ACTION] == HVACAction.IDLE assert sorted(state.attributes[ATTR_HVAC_MODES]) == [ @@ -240,6 +242,8 @@ async def test_basic_thermostat_entity_state( state.attributes[ATTR_SUPPORTED_FEATURES] == ClimateEntityFeature.TARGET_TEMPERATURE_RANGE | ClimateEntityFeature.TARGET_TEMPERATURE + | ClimateEntityFeature.TURN_OFF + | ClimateEntityFeature.TURN_ON ) assert ATTR_HVAC_ACTION not in state.attributes assert sorted(state.attributes[ATTR_HVAC_MODES]) == [ @@ -261,6 +265,8 @@ async def test_thermostat_entity_state(hass: HomeAssistant, thermostat) -> None: == ClimateEntityFeature.FAN_MODE | ClimateEntityFeature.TARGET_TEMPERATURE_RANGE | ClimateEntityFeature.TARGET_TEMPERATURE + | ClimateEntityFeature.TURN_OFF + | ClimateEntityFeature.TURN_ON ) assert state.attributes[ATTR_HVAC_ACTION] == HVACAction.IDLE assert sorted(state.attributes[ATTR_HVAC_MODES]) == [ @@ -288,6 +294,8 @@ async def test_buggy_thermostat_entity_state( state.attributes[ATTR_SUPPORTED_FEATURES] == ClimateEntityFeature.TARGET_TEMPERATURE_RANGE | ClimateEntityFeature.TARGET_TEMPERATURE + | ClimateEntityFeature.TURN_OFF + | ClimateEntityFeature.TURN_ON ) assert state.state is STATE_UNKNOWN assert state.attributes[ATTR_TEMPERATURE] is None