From 928086a9e59a2ad29a20bed6bf9c3518e85d70d8 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 17 Oct 2023 16:43:10 +0200 Subject: [PATCH] Fix menu in hassio repair flow (#102162) --- homeassistant/components/hassio/repairs.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/hassio/repairs.py b/homeassistant/components/hassio/repairs.py index d5e26d4670f..8337405641c 100644 --- a/homeassistant/components/hassio/repairs.py +++ b/homeassistant/components/hassio/repairs.py @@ -86,15 +86,21 @@ class SupervisorIssueRepairFlow(RepairsFlow): ) if len(self.issue.suggestions) > 1: - return self.async_show_menu( - step_id="fix_menu", - menu_options=[suggestion.key for suggestion in self.issue.suggestions], - description_placeholders=self.description_placeholders, - ) + return await self.async_step_fix_menu() # Always show a form for one suggestion to explain to user what's happening return self._async_form_for_suggestion(self.issue.suggestions[0]) + async def async_step_fix_menu(self, _: None = None) -> FlowResult: + """Show the fix menu.""" + assert self.issue + + return self.async_show_menu( + step_id="fix_menu", + menu_options=[suggestion.key for suggestion in self.issue.suggestions], + description_placeholders=self.description_placeholders, + ) + async def _async_step_apply_suggestion( self, suggestion: Suggestion, confirmed: bool = False ) -> FlowResult: