mirror of
https://github.com/home-assistant/core.git
synced 2026-06-02 05:34:15 +01:00
31 lines
838 B
Python
31 lines
838 B
Python
"""Models for Repairs."""
|
|
|
|
from typing import Protocol
|
|
|
|
from homeassistant import data_entry_flow
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
# Placeholder TypeAlias for future TypedDict to handle next_flow.
|
|
RepairsFlowResult = data_entry_flow.FlowResult[data_entry_flow.FlowContext, str]
|
|
|
|
|
|
class RepairsFlow(
|
|
data_entry_flow.FlowHandler[data_entry_flow.FlowContext, RepairsFlowResult, str]
|
|
):
|
|
"""Handle a flow for fixing an issue."""
|
|
|
|
issue_id: str
|
|
data: dict[str, str | int | float | None] | None
|
|
|
|
|
|
class RepairsProtocol(Protocol):
|
|
"""Define the format of repairs platforms."""
|
|
|
|
async def async_create_fix_flow(
|
|
self,
|
|
hass: HomeAssistant,
|
|
issue_id: str,
|
|
data: dict[str, str | int | float | None] | None,
|
|
) -> RepairsFlow:
|
|
"""Create a flow to fix a fixable issue."""
|