diff --git a/homeassistant/components/min_max/config_flow.py b/homeassistant/components/min_max/config_flow.py index f6c7c8b6399b..9be6dc8c637c 100644 --- a/homeassistant/components/min_max/config_flow.py +++ b/homeassistant/components/min_max/config_flow.py @@ -9,6 +9,7 @@ from homeassistant.components.input_number import DOMAIN as INPUT_NUMBER_DOMAIN from homeassistant.components.number import DOMAIN as NUMBER_DOMAIN from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN from homeassistant.const import CONF_TYPE +from homeassistant.data_entry_flow import AbortFlow from homeassistant.helpers import selector from homeassistant.helpers.schema_config_entry_flow import ( SchemaCommonFlowHandler, @@ -57,8 +58,7 @@ async def migrate_to_groups( handler: SchemaCommonFlowHandler, user_input: dict[str, Any] ) -> dict[str, Any]: """Abort flow as migrate to groups.""" - handler.parent_handler.async_abort(reason="migrated_to_groups") - return user_input + raise AbortFlow("migrated_to_groups") CONFIG_FLOW = { diff --git a/homeassistant/components/min_max/strings.json b/homeassistant/components/min_max/strings.json index 43b44021fbfd..1cf7afce51e3 100644 --- a/homeassistant/components/min_max/strings.json +++ b/homeassistant/components/min_max/strings.json @@ -14,7 +14,7 @@ "data_description": { "round_digits": "Controls the number of decimal digits in the output when the statistics characteristic is mean, median or sum." }, - "description": "Create a sensor that calculates a min, max, mean, median or sum from a list of input sensors.", + "description": "Combine the state of several sensors has been deprecated, please use the group integration instead.", "title": "[%key:component::min_max::title%]" } }