1
0
mirror of https://github.com/home-assistant/core.git synced 2026-06-06 15:36:51 +01:00
Files
core/homeassistant/components/repairs/models.py
T
Erik Montnemery dfed3ba75e Move issue_registry to homeassistant.helpers (#77299)
* Move issue_registry to homeassistant.helpers

* Add backwards compatibility
2022-08-25 11:32:06 +02:00

32 lines
834 B
Python

"""Models for Repairs."""
from __future__ import annotations
from typing import Protocol
from homeassistant import data_entry_flow
from homeassistant.core import HomeAssistant
# pylint: disable-next=unused-import
from homeassistant.helpers.issue_registry import ( # noqa: F401; Remove when integrations have been updated
IssueSeverity,
)
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."""