mirror of
https://github.com/home-assistant/core.git
synced 2026-08-24 10:13:52 -05:00
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016D21QGmGduj7t1aQLX26pS
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user