1 """Repairs platform for the demo integration."""
3 from __future__
import annotations
5 import voluptuous
as vol
7 from homeassistant
import data_entry_flow
13 """Handler for an issue fixing flow."""
16 self, user_input: dict[str, str] |
None =
None
18 """Handle the first step of a fix flow."""
20 return await self.async_step_confirm()
23 self, user_input: dict[str, str] |
None =
None
25 """Handle the confirm step of a fix flow."""
26 if user_input
is not None:
27 return self.async_create_entry(data={})
29 return self.async_show_form(step_id=
"confirm", data_schema=vol.Schema({}))
33 """Handler for cold tea."""
36 self, user_input: dict[str, str] |
None =
None
38 """Handle the first step of a fix flow."""
39 return self.async_abort(reason=
"not_tea_time")
45 data: dict[str, str | int | float |
None] |
None,
48 if issue_id ==
"bad_psu":
50 return ConfirmRepairFlow()
52 if issue_id ==
"cold_tea":
data_entry_flow.FlowResult async_step_init(self, dict[str, str]|None user_input=None)
data_entry_flow.FlowResult async_step_init(self, dict[str, str]|None user_input=None)
RepairsFlow async_create_fix_flow(HomeAssistant hass, str issue_id, dict[str, str|int|float|None]|None data)
config_entries.ConfigFlowResult async_step_confirm(self, dict[str, Any]|None user_input=None)