2022-07-20 10:06:52 +00:00
|
|
|
"""Models for Repairs."""
|
2022-07-08 03:49:07 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
2022-07-12 17:26:06 +00:00
|
|
|
from typing import Protocol
|
|
|
|
|
|
|
|
from homeassistant import data_entry_flow
|
|
|
|
from homeassistant.core import HomeAssistant
|
2022-07-08 03:49:07 +00:00
|
|
|
|
2022-07-12 17:26:06 +00:00
|
|
|
|
2022-07-20 10:06:52 +00:00
|
|
|
class RepairsFlow(data_entry_flow.FlowHandler):
|
2022-07-12 17:26:06 +00:00
|
|
|
"""Handle a flow for fixing an issue."""
|
|
|
|
|
2022-08-05 11:16:29 +00:00
|
|
|
issue_id: str
|
|
|
|
data: dict[str, str | int | float | None] | None
|
|
|
|
|
2022-07-12 17:26:06 +00:00
|
|
|
|
2022-07-20 10:06:52 +00:00
|
|
|
class RepairsProtocol(Protocol):
|
|
|
|
"""Define the format of repairs platforms."""
|
2022-07-12 17:26:06 +00:00
|
|
|
|
|
|
|
async def async_create_fix_flow(
|
2022-08-05 11:16:29 +00:00
|
|
|
self,
|
|
|
|
hass: HomeAssistant,
|
|
|
|
issue_id: str,
|
|
|
|
data: dict[str, str | int | float | None] | None,
|
2022-07-20 10:06:52 +00:00
|
|
|
) -> RepairsFlow:
|
2022-07-12 17:26:06 +00:00
|
|
|
"""Create a flow to fix a fixable issue."""
|