diff --git a/homeassistant/components/nest/config_flow.py b/homeassistant/components/nest/config_flow.py index 479a54edbc7..2e89f7970fa 100644 --- a/homeassistant/components/nest/config_flow.py +++ b/homeassistant/components/nest/config_flow.py @@ -11,7 +11,7 @@ from __future__ import annotations import asyncio from collections import OrderedDict -from collections.abc import Iterable +from collections.abc import Iterable, Mapping from enum import Enum import logging import os @@ -218,14 +218,9 @@ class NestFlowHandler( return await self.async_step_finish() return await self.async_step_pubsub() - async def async_step_reauth( - self, user_input: dict[str, Any] | None = None - ) -> FlowResult: + async def async_step_reauth(self, user_input: Mapping[str, Any]) -> FlowResult: """Perform reauth upon an API authentication error.""" assert self.config_mode != ConfigMode.LEGACY, "Step only supported for SDM API" - if user_input is None: - _LOGGER.error("Reauth invoked with empty config entry data") - return self.async_abort(reason="missing_configuration") self._data.update(user_input) return await self.async_step_reauth_confirm() diff --git a/tests/components/nest/test_config_flow_sdm.py b/tests/components/nest/test_config_flow_sdm.py index 53a2d9cf2b6..b2ef95b138e 100644 --- a/tests/components/nest/test_config_flow_sdm.py +++ b/tests/components/nest/test_config_flow_sdm.py @@ -505,18 +505,6 @@ async def test_reauth_multiple_config_entries( assert entry.data.get("extra_data") -async def test_reauth_missing_config_entry(hass, setup_platform): - """Test the reauth flow invoked missing existing data.""" - await setup_platform() - - # Invoke the reauth flow with no existing data - result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": config_entries.SOURCE_REAUTH}, data=None - ) - assert result["type"] == "abort" - assert result["reason"] == "missing_configuration" - - @pytest.mark.parametrize( "nest_test_config,auth_implementation", [(TEST_CONFIG_HYBRID, APP_AUTH_DOMAIN)] )