diff --git a/homeassistant/helpers/config_entry_flow.py b/homeassistant/helpers/config_entry_flow.py index 847a90a0d1b..bf2f95c12c6 100644 --- a/homeassistant/helpers/config_entry_flow.py +++ b/homeassistant/helpers/config_entry_flow.py @@ -10,7 +10,7 @@ from homeassistant.components import onboarding from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import FlowResult -from .typing import UNDEFINED, DiscoveryInfoType, UndefinedType +from .typing import DiscoveryInfoType if TYPE_CHECKING: import asyncio @@ -173,23 +173,8 @@ def register_discovery_flow( domain: str, title: str, discovery_function: DiscoveryFunctionType[Awaitable[bool] | bool], - connection_class: str | UndefinedType = UNDEFINED, ) -> None: """Register flow for discovered integrations that not require auth.""" - if connection_class is not UNDEFINED: - _LOGGER.warning( - ( - "The %s (%s) integration is setting a connection_class" - " when calling the 'register_discovery_flow()' method in its" - " config flow. The connection class has been deprecated and will" - " be removed in a future release of Home Assistant." - " If '%s' is a custom integration, please contact the author" - " of that integration about this warning.", - ), - title, - domain, - domain, - ) class DiscoveryFlow(DiscoveryFlowHandler[Union[Awaitable[bool], bool]]): """Discovery flow handler.""" diff --git a/tests/helpers/test_config_entry_flow.py b/tests/helpers/test_config_entry_flow.py index 63fa58851e3..a4a3e2b27e7 100644 --- a/tests/helpers/test_config_entry_flow.py +++ b/tests/helpers/test_config_entry_flow.py @@ -418,14 +418,3 @@ async def test_webhook_create_cloudhook_aborts_not_connected(hass, webhook_flow_ assert result["type"] == data_entry_flow.FlowResultType.ABORT assert result["reason"] == "cloud_not_connected" - - -async def test_warning_deprecated_connection_class(hass, caplog): - """Test that we log a warning when the connection_class is used.""" - discovery_function = Mock() - with patch.dict(config_entries.HANDLERS): - config_entry_flow.register_discovery_flow( - "test", "Test", discovery_function, connection_class="local_polling" - ) - - assert "integration is setting a connection_class" in caplog.text