1 """Repairs for DoorBird."""
3 from __future__
import annotations
5 import voluptuous
as vol
7 from homeassistant
import data_entry_flow
14 """Handler to show doorbird error and reload."""
17 """Initialize the flow."""
21 self, user_input: dict[str, str] |
None =
None
23 """Handle the first step of a fix flow."""
27 self, user_input: dict[str, str] |
None =
None
29 """Handle the confirm step of a fix flow."""
30 if user_input
is not None:
31 self.hass.config_entries.async_schedule_reload(self.
entry_identry_id)
32 return self.async_create_entry(data={})
34 issue_registry = ir.async_get(self.hass)
35 description_placeholders =
None
36 if issue := issue_registry.async_get_issue(self.handler, self.issue_id):
37 description_placeholders = issue.translation_placeholders
39 return self.async_show_form(
41 data_schema=vol.Schema({}),
42 description_placeholders=description_placeholders,
49 data: dict[str, str | int | float |
None] |
None,
52 assert data
is not None
53 entry_id = data[
"entry_id"]
54 assert isinstance(entry_id, str)
data_entry_flow.FlowResult async_step_confirm(self, dict[str, str]|None user_input=None)
data_entry_flow.FlowResult async_step_init(self, dict[str, str]|None user_input=None)
None __init__(self, str entry_id)
RepairsFlow async_create_fix_flow(HomeAssistant hass, str issue_id, dict[str, str|int|float|None]|None data)