Use Mapping for async_step_reauth in motioneye (#72769)
This commit is contained in:
parent
394442e8a9
commit
a6db25219d
2 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
"""Config flow for motionEye integration."""
|
"""Config flow for motionEye integration."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Mapping
|
||||||
from typing import Any, cast
|
from typing import Any, cast
|
||||||
|
|
||||||
from motioneye_client.client import (
|
from motioneye_client.client import (
|
||||||
|
@ -158,10 +159,10 @@ class MotionEyeConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||||
|
|
||||||
async def async_step_reauth(
|
async def async_step_reauth(
|
||||||
self,
|
self,
|
||||||
config_data: dict[str, Any] | None = None,
|
config_data: Mapping[str, Any],
|
||||||
) -> FlowResult:
|
) -> FlowResult:
|
||||||
"""Handle a reauthentication flow."""
|
"""Handle a reauthentication flow."""
|
||||||
return await self.async_step_user(config_data)
|
return await self.async_step_user()
|
||||||
|
|
||||||
async def async_step_hassio(self, discovery_info: HassioServiceInfo) -> FlowResult:
|
async def async_step_hassio(self, discovery_info: HassioServiceInfo) -> FlowResult:
|
||||||
"""Handle Supervisor discovery."""
|
"""Handle Supervisor discovery."""
|
||||||
|
|
|
@ -259,6 +259,7 @@ async def test_reauth(hass: HomeAssistant) -> None:
|
||||||
"source": config_entries.SOURCE_REAUTH,
|
"source": config_entries.SOURCE_REAUTH,
|
||||||
"entry_id": config_entry.entry_id,
|
"entry_id": config_entry.entry_id,
|
||||||
},
|
},
|
||||||
|
data=config_entry.data,
|
||||||
)
|
)
|
||||||
assert result["type"] == "form"
|
assert result["type"] == "form"
|
||||||
assert not result["errors"]
|
assert not result["errors"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue