Clean up start_subentry_reconfigure_flow API for tests (#147381)

This commit is contained in:
Paulus Schoutsen
2025-06-23 15:45:33 -04:00
committed by GitHub
parent b4fe6f3843
commit 7f99cd2d2b
4 changed files with 14 additions and 33 deletions

View File

@@ -1184,7 +1184,6 @@ class MockConfigEntry(config_entries.ConfigEntry):
async def start_subentry_reconfigure_flow(
self,
hass: HomeAssistant,
subentry_flow_type: str,
subentry_id: str,
*,
show_advanced_options: bool = False,
@@ -1194,6 +1193,8 @@ class MockConfigEntry(config_entries.ConfigEntry):
raise ValueError(
"Config entry must be added to hass to start reconfiguration flow"
)
# Derive subentry_flow_type from the subentry_id
subentry_flow_type = self.subentries[subentry_id].subentry_type
return await hass.config_entries.subentries.async_init(
(self.entry_id, subentry_flow_type),
context={