diff --git a/homeassistant/components/elkm1/config_flow.py b/homeassistant/components/elkm1/config_flow.py index 19a3cf88473..2453958b3de 100644 --- a/homeassistant/components/elkm1/config_flow.py +++ b/homeassistant/components/elkm1/config_flow.py @@ -126,10 +126,10 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): ) return await self._async_handle_discovery() - async def async_step_discovery( + async def async_step_integration_discovery( self, discovery_info: DiscoveryInfoType ) -> FlowResult: - """Handle discovery.""" + """Handle integration discovery.""" self._discovered_device = ElkSystem( discovery_info["mac_address"], discovery_info["ip_address"], diff --git a/homeassistant/components/elkm1/discovery.py b/homeassistant/components/elkm1/discovery.py index 10d9f7b6e40..7055f3958e9 100644 --- a/homeassistant/components/elkm1/discovery.py +++ b/homeassistant/components/elkm1/discovery.py @@ -88,7 +88,7 @@ def async_trigger_discovery( hass.async_create_task( hass.config_entries.flow.async_init( DOMAIN, - context={"source": config_entries.SOURCE_DISCOVERY}, + context={"source": config_entries.SOURCE_INTEGRATION_DISCOVERY}, data=asdict(device), ) ) diff --git a/tests/components/elkm1/test_config_flow.py b/tests/components/elkm1/test_config_flow.py index 76db04944b5..d8a0feea670 100644 --- a/tests/components/elkm1/test_config_flow.py +++ b/tests/components/elkm1/test_config_flow.py @@ -656,7 +656,7 @@ async def test_form_import_device_discovered(hass): "source, data", [ (config_entries.SOURCE_DHCP, DHCP_DISCOVERY), - (config_entries.SOURCE_DISCOVERY, ELK_DISCOVERY_INFO), + (config_entries.SOURCE_INTEGRATION_DISCOVERY, ELK_DISCOVERY_INFO), ], ) async def test_discovered_by_dhcp_or_discovery_mac_address_mismatch_host_already_configured( @@ -686,7 +686,7 @@ async def test_discovered_by_dhcp_or_discovery_mac_address_mismatch_host_already "source, data", [ (config_entries.SOURCE_DHCP, DHCP_DISCOVERY), - (config_entries.SOURCE_DISCOVERY, ELK_DISCOVERY_INFO), + (config_entries.SOURCE_INTEGRATION_DISCOVERY, ELK_DISCOVERY_INFO), ], ) async def test_discovered_by_dhcp_or_discovery_adds_missing_unique_id( @@ -717,7 +717,7 @@ async def test_discovered_by_discovery_and_dhcp(hass): with _patch_discovery(), _patch_elk(): result = await hass.config_entries.flow.async_init( DOMAIN, - context={"source": config_entries.SOURCE_DISCOVERY}, + context={"source": config_entries.SOURCE_INTEGRATION_DISCOVERY}, data=ELK_DISCOVERY_INFO, ) await hass.async_block_till_done() @@ -755,7 +755,7 @@ async def test_discovered_by_discovery(hass): with _patch_discovery(), _patch_elk(): result = await hass.config_entries.flow.async_init( DOMAIN, - context={"source": config_entries.SOURCE_DISCOVERY}, + context={"source": config_entries.SOURCE_INTEGRATION_DISCOVERY}, data=ELK_DISCOVERY_INFO, ) await hass.async_block_till_done() @@ -806,7 +806,7 @@ async def test_discovered_by_discovery_url_already_configured(hass): with _patch_discovery(), _patch_elk(): result = await hass.config_entries.flow.async_init( DOMAIN, - context={"source": config_entries.SOURCE_DISCOVERY}, + context={"source": config_entries.SOURCE_INTEGRATION_DISCOVERY}, data=ELK_DISCOVERY_INFO, ) await hass.async_block_till_done()