1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Align config flow reconfigure step test helper with frontend (#127329)

* Align config flow reconfigure step with frontend

* Update common.py

* Update common.py

* Adjust

* Adjust

* Fix test

* Adjust
This commit is contained in:
epenet
2024-10-03 10:21:23 +02:00
committed by GitHub
parent 94df3e931a
commit 7d3d693fe8
3 changed files with 14 additions and 63 deletions

View File

@@ -1069,8 +1069,8 @@ class MockConfigEntry(config_entries.ConfigEntry):
async def start_reconfigure_flow(
self,
hass: HomeAssistant,
context: dict[str, Any] | None = None,
data: dict[str, Any] | None = None,
*,
show_advanced_options: bool = False,
) -> ConfigFlowResult:
"""Start a reconfiguration flow."""
return await hass.config_entries.flow.async_init(
@@ -1078,11 +1078,8 @@ class MockConfigEntry(config_entries.ConfigEntry):
context={
"source": config_entries.SOURCE_RECONFIGURE,
"entry_id": self.entry_id,
"title_placeholders": {"name": self.title},
"unique_id": self.unique_id,
}
| (context or {}),
data=self.data | (data or {}),
"show_advanced_options": show_advanced_options,
},
)