diff --git a/homeassistant/components/blink/config_flow.py b/homeassistant/components/blink/config_flow.py index b62c7414f46..4f1c1997cad 100644 --- a/homeassistant/components/blink/config_flow.py +++ b/homeassistant/components/blink/config_flow.py @@ -1,7 +1,9 @@ """Config flow to configure Blink.""" from __future__ import annotations +from collections.abc import Mapping import logging +from typing import Any from blinkpy.auth import Auth, LoginError, TokenRefreshFailed from blinkpy.blinkpy import Blink, BlinkSetupError @@ -15,6 +17,7 @@ from homeassistant.const import ( CONF_USERNAME, ) from homeassistant.core import callback +from homeassistant.data_entry_flow import FlowResult from .const import DEFAULT_SCAN_INTERVAL, DEVICE_ID, DOMAIN @@ -120,9 +123,9 @@ class BlinkConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): errors=errors, ) - async def async_step_reauth(self, entry_data): + async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> FlowResult: """Perform reauth upon migration of old entries.""" - return await self.async_step_user(entry_data) + return await self.async_step_user(dict(entry_data)) @callback def _async_finish_flow(self): diff --git a/tests/components/blink/test_config_flow.py b/tests/components/blink/test_config_flow.py index 5e3b89002bf..5ea03eb2b62 100644 --- a/tests/components/blink/test_config_flow.py +++ b/tests/components/blink/test_config_flow.py @@ -246,7 +246,9 @@ async def test_form_unknown_error(hass): async def test_reauth_shows_user_step(hass): """Test reauth shows the user form.""" result = await hass.config_entries.flow.async_init( - DOMAIN, context={"source": config_entries.SOURCE_REAUTH} + DOMAIN, + context={"source": config_entries.SOURCE_REAUTH}, + data={"username": "blink@example.com", "password": "invalid_password"}, ) assert result["type"] == data_entry_flow.RESULT_TYPE_FORM assert result["step_id"] == "user"