fix: commit G3a wiring lost in the amend cycle — listener removal, update-only host path, reauth via the current API (stub surface includes async_update_reload_and_abort)

This commit is contained in:
James Mackay committed 2026-10-09 07:03:33 +01:00
1 parent bcb8b962e7
commit 086c089cc1
5 files changed
+60 -18

No files matched your search

+13
View File
@@ -133,6 +133,19 @@ def _install_stubs() -> None:
class OptionsFlow:
pass
# t29 G3a: the current config-entries API surface on the local stub
ConfigFlow._get_reauth_entry = lambda self, entry=None: entry
def _update_reload_and_abort(self, entry, **kwargs):
updates = kwargs.get("options_updates") or {}
options = entry.options
for key, value in updates.items():
options[key] = value
self.hass.config_entries.async_schedule_reload(entry.entry_id)
return self.async_abort(reason="reauth_successful")
ConfigFlow.async_update_reload_and_abort = _update_reload_and_abort
config_entries.ConfigFlow = ConfigFlow
config_entries.OptionsFlow = OptionsFlow
config_entries.ConfigEntry = type("ConfigEntry", (), {})