Home Assistant Unofficial Reference 2024.12.1
models.py
Go to the documentation of this file.
1 """Models for Repairs."""
2 
3 from __future__ import annotations
4 
5 from typing import Protocol
6 
7 from homeassistant import data_entry_flow
8 from homeassistant.core import HomeAssistant
9 
10 
12  """Handle a flow for fixing an issue."""
13 
14  issue_id: str
15  data: dict[str, str | int | float | None] | None
16 
17 
18 class RepairsProtocol(Protocol):
19  """Define the format of repairs platforms."""
20 
22  self,
23  hass: HomeAssistant,
24  issue_id: str,
25  data: dict[str, str | int | float | None] | None,
26  ) -> RepairsFlow:
27  """Create a flow to fix a fixable issue."""
RepairsFlow async_create_fix_flow(self, HomeAssistant hass, str issue_id, dict[str, str|int|float|None]|None data)
Definition: models.py:26