diff --git a/homeassistant/components/proximity/config_flow.py b/homeassistant/components/proximity/config_flow.py index d133b14cb6ac96899e4349a29205303eb37d9daa..1758b182ad75a0618d2cc17577e5f58ee6b7924a 100644 --- a/homeassistant/components/proximity/config_flow.py +++ b/homeassistant/components/proximity/config_flow.py @@ -117,12 +117,6 @@ class ProximityConfigFlow(ConfigFlow, domain=DOMAIN): data_schema=self._user_form_schema(user_input), ) - async def async_step_import( - self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Import a yaml config entry.""" - return await self.async_step_user(user_input) - class ProximityOptionsFlow(OptionsFlow): """Handle a option flow.""" diff --git a/tests/components/proximity/test_config_flow.py b/tests/components/proximity/test_config_flow.py index 3ed9f5cba27ff0b01fdae5d62e654eb861426652..626565146d15d16d2ef74b9a81ecb6561e530a23 100644 --- a/tests/components/proximity/test_config_flow.py +++ b/tests/components/proximity/test_config_flow.py @@ -10,8 +10,8 @@ from homeassistant.components.proximity.const import ( CONF_TRACKED_ENTITIES, DOMAIN, ) -from homeassistant.config_entries import SOURCE_IMPORT, SOURCE_USER -from homeassistant.const import CONF_NAME, CONF_UNIT_OF_MEASUREMENT, CONF_ZONE +from homeassistant.config_entries import SOURCE_USER +from homeassistant.const import CONF_ZONE from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import FlowResultType @@ -120,42 +120,6 @@ async def test_options_flow(hass: HomeAssistant) -> None: } -async def test_import_flow(hass: HomeAssistant) -> None: - """Test import of yaml configuration.""" - with patch( - "homeassistant.components.proximity.async_setup_entry", return_value=True - ) as mock_setup_entry: - result = await hass.config_entries.flow.async_init( - DOMAIN, - context={"source": SOURCE_IMPORT}, - data={ - CONF_NAME: "home", - CONF_ZONE: "zone.home", - CONF_TRACKED_ENTITIES: ["device_tracker.test1"], - CONF_IGNORED_ZONES: ["zone.work"], - CONF_TOLERANCE: 10, - CONF_UNIT_OF_MEASUREMENT: "km", - }, - ) - - assert result["type"] is FlowResultType.CREATE_ENTRY - assert result["data"] == { - CONF_NAME: "home", - CONF_ZONE: "zone.home", - CONF_TRACKED_ENTITIES: ["device_tracker.test1"], - CONF_IGNORED_ZONES: ["zone.work"], - CONF_TOLERANCE: 10, - CONF_UNIT_OF_MEASUREMENT: "km", - } - - zone = hass.states.get("zone.home") - assert result["title"] == zone.name - - await hass.async_block_till_done() - - assert mock_setup_entry.called - - async def test_abort_duplicated_entry(hass: HomeAssistant) -> None: """Test if we abort on duplicate user input data.""" DATA = {