From aa38fb67907dfb4d4a04191f2978809c855d7d12 Mon Sep 17 00:00:00 2001 From: Grant Ellsworth Date: Mon, 18 May 2026 22:24:57 +0000 Subject: [PATCH] Anticipate user_input is None at runtime --- homeassistant/components/anthropic/repairs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/anthropic/repairs.py b/homeassistant/components/anthropic/repairs.py index de96d8e8d378b8..bbd34384b1e221 100644 --- a/homeassistant/components/anthropic/repairs.py +++ b/homeassistant/components/anthropic/repairs.py @@ -40,9 +40,11 @@ def __init__(self) -> None: self._current_subentry_id = None self._model_list_cache = None - async def async_step_init(self, user_input: dict[str, str]) -> RepairsFlowResult: + async def async_step_init( + self, user_input: dict[str, str] | None + ) -> RepairsFlowResult: """Handle the steps of a fix flow.""" - if user_input.get(CONF_CHAT_MODEL): + if user_input and user_input.get(CONF_CHAT_MODEL): self._async_update_current_subentry(user_input) target = await self._async_next_target()