diff --git a/homeassistant/components/mqtt/climate.py b/homeassistant/components/mqtt/climate.py index c3e3448da0a..3df9db0d5d0 100644 --- a/homeassistant/components/mqtt/climate.py +++ b/homeassistant/components/mqtt/climate.py @@ -703,7 +703,7 @@ class MqttClimate(MqttTemperatureControlEntity, ClimateEntity): config.get(key), entity=self ).async_render - support = ClimateEntityFeature(0) + support = ClimateEntityFeature.TURN_ON | ClimateEntityFeature.TURN_OFF if (self._topic[CONF_TEMP_STATE_TOPIC] is not None) or ( self._topic[CONF_TEMP_COMMAND_TOPIC] is not None ): diff --git a/tests/components/mqtt/test_climate.py b/tests/components/mqtt/test_climate.py index b1c6cf5ddd8..6fcb219f6b6 100644 --- a/tests/components/mqtt/test_climate.py +++ b/tests/components/mqtt/test_climate.py @@ -121,6 +121,17 @@ async def test_setup_params( assert state.attributes.get("max_temp") == DEFAULT_MAX_TEMP assert state.attributes.get("min_humidity") == DEFAULT_MIN_HUMIDITY assert state.attributes.get("max_humidity") == DEFAULT_MAX_HUMIDITY + assert ( + state.attributes.get("supported_features") + == ClimateEntityFeature.TARGET_TEMPERATURE + | ClimateEntityFeature.TARGET_TEMPERATURE_RANGE + | ClimateEntityFeature.TARGET_HUMIDITY + | ClimateEntityFeature.FAN_MODE + | ClimateEntityFeature.PRESET_MODE + | ClimateEntityFeature.SWING_MODE + | ClimateEntityFeature.TURN_OFF + | ClimateEntityFeature.TURN_ON + ) @pytest.mark.parametrize(