From b34315f0aa89b829f0b458dffacf1b1b0d07dad3 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 21 Aug 2026 20:47:46 +0000 Subject: [PATCH] Only drop the LLM API key when it was not submitted Keep the recommended value as the fallback for a subentry with no llm_hass_api key, and only remove the key when it is absent from the submitted input, so an empty selection is stored and read back as empty. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_016D21QGmGduj7t1aQLX26pS --- homeassistant/components/open_router/config_flow.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/open_router/config_flow.py b/homeassistant/components/open_router/config_flow.py index 49e866fcbf37..bbaade6e9b2e 100644 --- a/homeassistant/components/open_router/config_flow.py +++ b/homeassistant/components/open_router/config_flow.py @@ -146,6 +146,8 @@ class ConversationFlowHandler(OpenRouterSubentryFlowHandler): return self.async_abort(reason="entry_not_loaded") if user_input is not None: + if user_input.get(CONF_LLM_HASS_API) is None: + user_input.pop(CONF_LLM_HASS_API, None) if self._is_new: return self.async_create_entry( title=self.models[user_input[CONF_MODEL]].name, data=user_input