mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix menu in hassio repair flow (#102162)
This commit is contained in:
parent
fc09d87c3c
commit
928086a9e5
@ -86,15 +86,21 @@ class SupervisorIssueRepairFlow(RepairsFlow):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if len(self.issue.suggestions) > 1:
|
if len(self.issue.suggestions) > 1:
|
||||||
|
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(
|
return self.async_show_menu(
|
||||||
step_id="fix_menu",
|
step_id="fix_menu",
|
||||||
menu_options=[suggestion.key for suggestion in self.issue.suggestions],
|
menu_options=[suggestion.key for suggestion in self.issue.suggestions],
|
||||||
description_placeholders=self.description_placeholders,
|
description_placeholders=self.description_placeholders,
|
||||||
)
|
)
|
||||||
|
|
||||||
# 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_apply_suggestion(
|
async def _async_step_apply_suggestion(
|
||||||
self, suggestion: Suggestion, confirmed: bool = False
|
self, suggestion: Suggestion, confirmed: bool = False
|
||||||
) -> FlowResult:
|
) -> FlowResult:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user