1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-25 21:47:08 +00:00
Files
core/homeassistant/components/repairs/models.py
2024-03-08 15:05:07 +01:00

28 lines
667 B
Python

"""Models for Repairs."""
from __future__ import annotations
from typing import Protocol
from homeassistant import data_entry_flow
from homeassistant.core import HomeAssistant
class RepairsFlow(data_entry_flow.FlowHandler):
"""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."""